LKML Archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] arm64: dts: rockchip: add the PCIe PHY for RK3399
@ 2016-08-19  3:24 Shawn Lin
  2016-08-19  3:24 ` [PATCH 2/3] arm64: dts: rockchip: add the PCIe controller support " Shawn Lin
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Shawn Lin @ 2016-08-19  3:24 UTC (permalink / raw
  To: Heiko Stuebner
  Cc: Wenrui Li, Doug Anderson, Brian Norris, linux-rockchip,
	linux-kernel, Shawn Lin

This patch adds PCIe node for RK3399 to support
PCIe controller.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
---

 arch/arm64/boot/dts/rockchip/rk3399.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
index 62d4509..5694e27 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
@@ -988,6 +988,16 @@
 			#phy-cells = <0>;
 			status = "disabled";
 		};
+
+		pcie_phy: phy@e220 {
+			compatible = "rockchip,rk3399-pcie-phy";
+			clocks = <&cru SCLK_PCIEPHY_REF>;
+			clock-names = "refclk";
+			#phy-cells = <0>;
+			resets = <&cru SRST_PCIEPHY>;
+			reset-names = "phy";
+			status = "disabled";
+		};
 	};
 
 	watchdog@ff840000 {
-- 
2.3.7

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/3] arm64: dts: rockchip: add the PCIe controller support for RK3399
  2016-08-19  3:24 [PATCH 1/3] arm64: dts: rockchip: add the PCIe PHY for RK3399 Shawn Lin
@ 2016-08-19  3:24 ` Shawn Lin
  2016-08-19  3:24 ` [PATCH 3/3] arm64: dts: rockchip: configure PCIe support for rk3399-evb Shawn Lin
  2016-09-02 15:18 ` [PATCH 1/3] arm64: dts: rockchip: add the PCIe PHY for RK3399 Heiko Stübner
  2 siblings, 0 replies; 4+ messages in thread
From: Shawn Lin @ 2016-08-19  3:24 UTC (permalink / raw
  To: Heiko Stuebner
  Cc: Wenrui Li, Doug Anderson, Brian Norris, linux-rockchip,
	linux-kernel, Shawn Lin

This patch introduces PCIe support found on RK3399 platform,
and specify phys phandle for it.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
---

 arch/arm64/boot/dts/rockchip/rk3399.dtsi | 51 ++++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
index 5694e27..e502b5b 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
@@ -242,6 +242,44 @@
 		status = "disabled";
 	};
 
+	pcie0: pcie@f8000000 {
+		compatible = "rockchip,rk3399-pcie";
+		#address-cells = <3>;
+		#size-cells = <2>;
+		bus-range = <0x0 0x1>;
+		clocks = <&cru ACLK_PCIE>, <&cru ACLK_PERF_PCIE>,
+			 <&cru PCLK_PCIE>, <&cru SCLK_PCIE_PM>;
+		clock-names = "aclk", "aclk-perf",
+			      "hclk", "pm";
+		interrupts = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH 0>,
+			     <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH 0>,
+			     <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH 0>;
+		#interrupt-cells = <1>;
+		interrupt-names = "sys", "legacy", "client";
+		interrupt-map-mask = <0 0 0 7>;
+		interrupt-map = <0 0 0 1 &pcie0_intc 0>,
+				<0 0 0 2 &pcie0_intc 1>,
+				<0 0 0 3 &pcie0_intc 2>,
+				<0 0 0 4 &pcie0_intc 3>;
+		msi-map = <0x0 &its 0x0 0x1000>;
+		phys = <&pcie_phy>;
+		phy-names = "pcie-phy";
+		ranges = <0x83000000 0x0 0xfa000000 0x0 0xfa000000 0x0 0x600000
+			  0x81000000 0x0 0xfa600000 0x0 0xfa600000 0x0 0x100000>;
+		reg = <0x0 0xf8000000 0x0 0x2000000>,
+		      <0x0 0xfd000000 0x0 0x1000000>;
+		reg-names = "axi-base", "apb-base";
+		resets = <&cru SRST_PCIE_CORE>, <&cru SRST_PCIE_MGMT>,
+			 <&cru SRST_PCIE_MGMT_STICKY>, <&cru SRST_PCIE_PIPE>;
+		reset-names = "core", "mgmt", "mgmt-sticky", "pipe";
+		status = "disabled";
+		pcie0_intc: interrupt-controller {
+			interrupt-controller;
+			#address-cells = <0>;
+			#interrupt-cells = <1>;
+		};
+	};
+
 	usb_host0_ehci: usb@fe380000 {
 		compatible = "generic-ehci";
 		reg = <0x0 0xfe380000 0x0 0x20000>;
@@ -1552,5 +1590,18 @@
 					<1 14 RK_FUNC_1 &pcfg_pull_none>;
 			};
 		};
+
+		pcie {
+			pcie_clkreqn: pci-clkreqn {
+				rockchip,pins =
+					<2 26 RK_FUNC_2 &pcfg_pull_none>;
+			};
+
+			pcie_clkreqnb: pci-clkreqnb {
+				rockchip,pins =
+					<4 24 RK_FUNC_1 &pcfg_pull_none>;
+			};
+		};
+
 	};
 };
-- 
2.3.7

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 3/3] arm64: dts: rockchip: configure PCIe support for rk3399-evb
  2016-08-19  3:24 [PATCH 1/3] arm64: dts: rockchip: add the PCIe PHY for RK3399 Shawn Lin
  2016-08-19  3:24 ` [PATCH 2/3] arm64: dts: rockchip: add the PCIe controller support " Shawn Lin
@ 2016-08-19  3:24 ` Shawn Lin
  2016-09-02 15:18 ` [PATCH 1/3] arm64: dts: rockchip: add the PCIe PHY for RK3399 Heiko Stübner
  2 siblings, 0 replies; 4+ messages in thread
From: Shawn Lin @ 2016-08-19  3:24 UTC (permalink / raw
  To: Heiko Stuebner
  Cc: Wenrui Li, Doug Anderson, Brian Norris, linux-rockchip,
	linux-kernel, Shawn Lin

Let's assigne slot numbers, ep-gpios and clkreq used by PCIe
on evb board as well the PHY node here. Note that we still
disable them as the auto training of PCIe link will make the
kernel use more time to boot if there are no any devices there.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
---

 arch/arm64/boot/dts/rockchip/rk3399-evb.dts | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399-evb.dts b/arch/arm64/boot/dts/rockchip/rk3399-evb.dts
index d47b4e9..0d7c8ab 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-evb.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-evb.dts
@@ -120,6 +120,18 @@
 	status = "okay";
 };
 
+&pcie_phy {
+	status = "disabled";
+};
+
+&pcie0 {
+	ep-gpios = <&gpio3 13 GPIO_ACTIVE_HIGH>;
+	num-lanes = <4>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&pcie_clkreqn>;
+	status = "disabled";
+};
+
 &u2phy0 {
 	status = "okay";
 };
-- 
2.3.7

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/3] arm64: dts: rockchip: add the PCIe PHY for RK3399
  2016-08-19  3:24 [PATCH 1/3] arm64: dts: rockchip: add the PCIe PHY for RK3399 Shawn Lin
  2016-08-19  3:24 ` [PATCH 2/3] arm64: dts: rockchip: add the PCIe controller support " Shawn Lin
  2016-08-19  3:24 ` [PATCH 3/3] arm64: dts: rockchip: configure PCIe support for rk3399-evb Shawn Lin
@ 2016-09-02 15:18 ` Heiko Stübner
  2 siblings, 0 replies; 4+ messages in thread
From: Heiko Stübner @ 2016-09-02 15:18 UTC (permalink / raw
  To: Shawn Lin
  Cc: Wenrui Li, Doug Anderson, Brian Norris, linux-rockchip,
	linux-kernel

Am Freitag, 19. August 2016, 11:24:27 schrieb Shawn Lin:
> This patch adds PCIe node for RK3399 to support
> PCIe controller.
> 
> Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>

with both the pcie-controller and -phy now being in maintainer trees, I've 
applied all 3 dts patches to my dts64 branch for 4.9


Thanks
Heiko

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-09-02 15:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-19  3:24 [PATCH 1/3] arm64: dts: rockchip: add the PCIe PHY for RK3399 Shawn Lin
2016-08-19  3:24 ` [PATCH 2/3] arm64: dts: rockchip: add the PCIe controller support " Shawn Lin
2016-08-19  3:24 ` [PATCH 3/3] arm64: dts: rockchip: configure PCIe support for rk3399-evb Shawn Lin
2016-09-02 15:18 ` [PATCH 1/3] arm64: dts: rockchip: add the PCIe PHY for RK3399 Heiko Stübner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).