All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jagan Teki <jagan@amarulasolutions.com>
To: Kever Yang <kever.yang@rock-chips.com>,
	Philipp Tomsich <philipp.tomsich@theobroma-systems.com>,
	Simon Glass <sjg@chromium.org>
Cc: Suniel Mahesh <sunil@amarulasolutions.com>,
	U-Boot-Denx <u-boot@lists.denx.de>,
	linux-rockchip@lists.infradead.org,
	linux-amarula <linux-amarula@amarulasolutions.com>,
	Jagan Teki <jagan@amarulasolutions.com>
Subject: [PATCH v2 06/12] arm64: dts: rockchip: Add PCIe for RockPI N10
Date: Tue, 21 Jul 2020 20:54:40 +0530	[thread overview]
Message-ID: <20200721152443.37602-7-jagan@amarulasolutions.com> (raw)
In-Reply-To: <20200721152443.37602-1-jagan@amarulasolutions.com>

This patch adds support to enable PCIe for RockPI N10.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
Changes for v2:
- none

 arch/arm/dts/rk3399pro-vmarc-som.dtsi | 40 +++++++++++++++++++++++++--
 1 file changed, 38 insertions(+), 2 deletions(-)

diff --git a/arch/arm/dts/rk3399pro-vmarc-som.dtsi b/arch/arm/dts/rk3399pro-vmarc-som.dtsi
index ebccc4a153..5d087be04a 100644
--- a/arch/arm/dts/rk3399pro-vmarc-som.dtsi
+++ b/arch/arm/dts/rk3399pro-vmarc-som.dtsi
@@ -11,6 +11,18 @@
 
 / {
 	compatible = "vamrs,rk3399pro-vmarc-som", "rockchip,rk3399pro";
+
+	vcc3v3_pcie: vcc-pcie-regulator {
+		compatible = "regulator-fixed";
+		enable-active-high;
+		gpio = <&gpio4 RK_PD4 GPIO_ACTIVE_HIGH>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&pcie_pwr>;
+		regulator-name = "vcc3v3_pcie";
+		regulator-always-on;
+		regulator-boot-on;
+		vin-supply = <&vcc5v0_sys>;
+	};
 };
 
 &cpu_l0 {
@@ -142,7 +154,8 @@
 				regulator-min-microvolt = <900000>;
 				regulator-max-microvolt = <900000>;
 				regulator-state-mem {
-					regulator-off-in-suspend;
+					regulator-on-in-suspend;
+					regulator-suspend-microvolt = <900000>;
 				};
 			};
 
@@ -177,7 +190,8 @@
 				regulator-min-microvolt = <1850000>;
 				regulator-max-microvolt = <1850000>;
 				regulator-state-mem {
-					regulator-off-in-suspend;
+					regulator-on-in-suspend;
+					regulator-suspend-microvolt = <1850000>;
 				};
 			};
 
@@ -304,6 +318,22 @@
 	sdmmc-supply = <&vccio_sd>;
 };
 
+&pcie_phy {
+	status = "okay";
+};
+
+&pcie0 {
+	ep-gpios = <&gpio0 RK_PB4 GPIO_ACTIVE_HIGH>;
+	max-link-speed = <2>;
+	num-lanes = <4>;
+	pinctrl-0 = <&pcie_clkreqnb_cpm>;
+	pinctrl-names = "default";
+	vpcie0v9-supply = <&vcca_0v9>;	/* VCC_0V9_S0 */
+	vpcie1v8-supply = <&vcca_1v8>;	/* VCC_1V8_S0 */
+	vpcie3v3-supply = <&vcc3v3_pcie>;
+	status = "okay";
+};
+
 &pinctrl {
 	hym8563 {
 		hym8563_int: hym8563-int {
@@ -311,6 +341,12 @@
 		};
 	};
 
+	pcie {
+		pcie_pwr: pcie-pwr {
+			rockchip,pins =	<4 RK_PD4 RK_FUNC_GPIO &pcfg_pull_up>;
+		};
+	};
+
 	pmic {
 		pmic_int_l: pmic-int-l {
 			rockchip,pins = <1 RK_PC2 0 &pcfg_pull_up>;
-- 
2.25.1

WARNING: multiple messages have this Message-ID (diff)
From: Jagan Teki <jagan@amarulasolutions.com>
To: u-boot@lists.denx.de
Subject: [PATCH v2 06/12] arm64: dts: rockchip: Add PCIe for RockPI N10
Date: Tue, 21 Jul 2020 20:54:40 +0530	[thread overview]
Message-ID: <20200721152443.37602-7-jagan@amarulasolutions.com> (raw)
In-Reply-To: <20200721152443.37602-1-jagan@amarulasolutions.com>

This patch adds support to enable PCIe for RockPI N10.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
Changes for v2:
- none

 arch/arm/dts/rk3399pro-vmarc-som.dtsi | 40 +++++++++++++++++++++++++--
 1 file changed, 38 insertions(+), 2 deletions(-)

diff --git a/arch/arm/dts/rk3399pro-vmarc-som.dtsi b/arch/arm/dts/rk3399pro-vmarc-som.dtsi
index ebccc4a153..5d087be04a 100644
--- a/arch/arm/dts/rk3399pro-vmarc-som.dtsi
+++ b/arch/arm/dts/rk3399pro-vmarc-som.dtsi
@@ -11,6 +11,18 @@
 
 / {
 	compatible = "vamrs,rk3399pro-vmarc-som", "rockchip,rk3399pro";
+
+	vcc3v3_pcie: vcc-pcie-regulator {
+		compatible = "regulator-fixed";
+		enable-active-high;
+		gpio = <&gpio4 RK_PD4 GPIO_ACTIVE_HIGH>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&pcie_pwr>;
+		regulator-name = "vcc3v3_pcie";
+		regulator-always-on;
+		regulator-boot-on;
+		vin-supply = <&vcc5v0_sys>;
+	};
 };
 
 &cpu_l0 {
@@ -142,7 +154,8 @@
 				regulator-min-microvolt = <900000>;
 				regulator-max-microvolt = <900000>;
 				regulator-state-mem {
-					regulator-off-in-suspend;
+					regulator-on-in-suspend;
+					regulator-suspend-microvolt = <900000>;
 				};
 			};
 
@@ -177,7 +190,8 @@
 				regulator-min-microvolt = <1850000>;
 				regulator-max-microvolt = <1850000>;
 				regulator-state-mem {
-					regulator-off-in-suspend;
+					regulator-on-in-suspend;
+					regulator-suspend-microvolt = <1850000>;
 				};
 			};
 
@@ -304,6 +318,22 @@
 	sdmmc-supply = <&vccio_sd>;
 };
 
+&pcie_phy {
+	status = "okay";
+};
+
+&pcie0 {
+	ep-gpios = <&gpio0 RK_PB4 GPIO_ACTIVE_HIGH>;
+	max-link-speed = <2>;
+	num-lanes = <4>;
+	pinctrl-0 = <&pcie_clkreqnb_cpm>;
+	pinctrl-names = "default";
+	vpcie0v9-supply = <&vcca_0v9>;	/* VCC_0V9_S0 */
+	vpcie1v8-supply = <&vcca_1v8>;	/* VCC_1V8_S0 */
+	vpcie3v3-supply = <&vcc3v3_pcie>;
+	status = "okay";
+};
+
 &pinctrl {
 	hym8563 {
 		hym8563_int: hym8563-int {
@@ -311,6 +341,12 @@
 		};
 	};
 
+	pcie {
+		pcie_pwr: pcie-pwr {
+			rockchip,pins =	<4 RK_PD4 RK_FUNC_GPIO &pcfg_pull_up>;
+		};
+	};
+
 	pmic {
 		pmic_int_l: pmic-int-l {
 			rockchip,pins = <1 RK_PC2 0 &pcfg_pull_up>;
-- 
2.25.1

  parent reply	other threads:[~2020-07-21 15:24 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-21 15:24 [PATCH v2 00/12] rockchip: ROCKPi N8/N10 hardware enablement Jagan Teki
2020-07-21 15:24 ` Jagan Teki
2020-07-21 15:24 ` [PATCH v2 01/12] ARM: dts: rockchip: Sync ROCKPi N8/N10 dts(i) from Linux Jagan Teki
2020-07-21 15:24   ` Jagan Teki
2020-07-21 15:24 ` [PATCH v2 02/12] arm: dts: rockchip: Sync rk3288 dtsi from linux Jagan Teki
2020-07-21 15:24   ` Jagan Teki
2020-07-21 15:24 ` [PATCH v2 03/12] ARM: dts: rockchip: Add usb host0 ohci node for rk3288 Jagan Teki
2020-07-21 15:24   ` Jagan Teki
2020-07-22 12:28   ` Kever Yang
2020-07-22 12:28     ` Kever Yang
2020-07-21 15:24 ` [PATCH v2 04/12] ARM: dts: rockchip: Add USB for RockPI N8/N10 Jagan Teki
2020-07-21 15:24   ` Jagan Teki
2020-07-22 12:29   ` Kever Yang
2020-07-22 12:29     ` Kever Yang
2020-07-21 15:24 ` [PATCH v2 05/12] arm: dts: rockchip: Add HDMI out " Jagan Teki
2020-07-21 15:24   ` Jagan Teki
2020-07-22 12:29   ` Kever Yang
2020-07-22 12:29     ` Kever Yang
2020-07-21 15:24 ` Jagan Teki [this message]
2020-07-21 15:24   ` [PATCH v2 06/12] arm64: dts: rockchip: Add PCIe for RockPI N10 Jagan Teki
2020-07-22 12:29   ` Kever Yang
2020-07-22 12:29     ` Kever Yang
2020-07-21 15:24 ` [PATCH v2 07/12] rockchip: rock-pi-n10: Enable on board devices Jagan Teki
2020-07-21 15:24   ` Jagan Teki
2020-07-22 12:29   ` Kever Yang
2020-07-22 12:29     ` Kever Yang
2020-07-21 15:24 ` [PATCH v2 08/12] rockchip: evb_rk3288: Add console settings Jagan Teki
2020-07-21 15:24   ` Jagan Teki
2020-07-22 12:30   ` Kever Yang
2020-07-22 12:30     ` Kever Yang
2020-07-21 15:24 ` [PATCH v2 09/12] rockchip: rock-pi-n8: Enable on board devices Jagan Teki
2020-07-21 15:24   ` Jagan Teki
2020-07-22 12:30   ` Kever Yang
2020-07-22 12:30     ` Kever Yang
2020-07-22 13:10 ` [PATCH v2 00/12] rockchip: ROCKPi N8/N10 hardware enablement Kever Yang
2020-07-22 13:10   ` Kever Yang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200721152443.37602-7-jagan@amarulasolutions.com \
    --to=jagan@amarulasolutions.com \
    --cc=kever.yang@rock-chips.com \
    --cc=linux-amarula@amarulasolutions.com \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=philipp.tomsich@theobroma-systems.com \
    --cc=sjg@chromium.org \
    --cc=sunil@amarulasolutions.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.