devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Robin Murphy <robin.murphy@arm.com>
To: heiko@sntech.de
Cc: linux-rockchip@lists.infradead.org, tomeu.vizoso@collabora.com,
	linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org
Subject: [PATCH 3/5] arm64: dts: rockchip: Refine nanopi4 differences
Date: Tue,  8 Jan 2019 21:57:25 +0000	[thread overview]
Message-ID: <2123f6ef0bc4429fc48709af822289c82a63d46f.1546981251.git.robin.murphy@arm.com> (raw)
In-Reply-To: <cover.1546981251.git.robin.murphy@arm.com>

The nanopi4 boards differ primarily in their power trees, with the main
5V and 3.3V rails having very different topologies on the smaller USB-C
powered boards vs. the 12V-powered T4, as well as minor variation in
other regulators related to various external connectors.

Additionally, the recovery key is only present on the T4 - ADC_IN1 is
simply pulled high and not exposed on the other boards - and the lowest
common denominator for MMC speed is actually HS200 according to the
vendor DTs.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
---
 .../boot/dts/rockchip/rk3399-nanopc-t4.dts    | 58 +++++++++++++++++++
 .../boot/dts/rockchip/rk3399-nanopi-m4.dts    | 48 +++++++++++++++
 .../boot/dts/rockchip/rk3399-nanopi4.dtsi     | 55 +-----------------
 3 files changed, 107 insertions(+), 54 deletions(-)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399-nanopc-t4.dts b/arch/arm64/boot/dts/rockchip/rk3399-nanopc-t4.dts
index af0bb2544709..623a03f2548a 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-nanopc-t4.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-nanopc-t4.dts
@@ -14,4 +14,62 @@
 / {
 	model = "FriendlyElec NanoPC-T4";
 	compatible = "friendlyarm,nanopc-t4", "rockchip,rk3399";
+
+	vcc12v0_sys: vcc12v0-sys {
+		compatible = "regulator-fixed";
+		regulator-always-on;
+		regulator-boot-on;
+		regulator-max-microvolt = <12000000>;
+		regulator-min-microvolt = <12000000>;
+		regulator-name = "vcc12v0_sys";
+	};
+
+	vcc5v0_host0: vcc5v0-host0 {
+		compatible = "regulator-fixed";
+		regulator-always-on;
+		regulator-boot-on;
+		regulator-name = "vcc5v0_host0";
+		vin-supply = <&vcc5v0_sys>;
+	};
+
+	adc-keys {
+		compatible = "adc-keys";
+		io-channels = <&saradc 1>;
+		io-channel-names = "buttons";
+		keyup-threshold-microvolt = <1800000>;
+		poll-interval = <100>;
+
+		recovery {
+			label = "Recovery";
+			linux,code = <KEY_VENDOR>;
+			press-threshold-microvolt = <18000>;
+		};
+	};
+};
+
+&sdhci {
+	mmc-hs400-1_8v;
+	mmc-hs400-enhanced-strobe;
+};
+
+&u2phy0_host {
+	phy-supply = <&vcc5v0_host0>;
+};
+
+&u2phy1_host {
+	phy-supply = <&vcc5v0_host0>;
+};
+
+&vcc5v0_sys {
+	vin-supply = <&vcc12v0_sys>;
+};
+
+&vcc3v3_sys {
+	vin-supply = <&vcc12v0_sys>;
+};
+
+&vbus_typec {
+	enable-active-high;
+	gpios = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>;
+	vin-supply = <&vcc5v0_sys>;
 };
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-nanopi-m4.dts b/arch/arm64/boot/dts/rockchip/rk3399-nanopi-m4.dts
index 8d3f0ba29c72..60358ab8c7df 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-nanopi-m4.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-nanopi-m4.dts
@@ -15,4 +15,52 @@
 / {
 	model = "FriendlyElec NanoPi M4";
 	compatible = "friendlyarm,nanopi-m4", "rockchip,rk3399";
+
+	vdd_5v: vdd-5v {
+		compatible = "regulator-fixed";
+		regulator-name = "vdd_5v";
+		regulator-always-on;
+		regulator-boot-on;
+	};
+
+	vcc5v0_core: vcc5v0-core {
+		compatible = "regulator-fixed";
+		regulator-name = "vcc5v0_core";
+		regulator-always-on;
+		regulator-boot-on;
+		vin-supply = <&vdd_5v>;
+	};
+
+	vcc5v0_usb1: vcc5v0-usb1 {
+		compatible = "regulator-fixed";
+		regulator-name = "vcc5v0_usb1";
+		regulator-always-on;
+		regulator-boot-on;
+		vin-supply = <&vcc5v0_sys>;
+	};
+
+	vcc5v0_usb2: vcc5v0-usb2 {
+		compatible = "regulator-fixed";
+		regulator-name = "vcc5v0_usb2";
+		regulator-always-on;
+		regulator-boot-on;
+		vin-supply = <&vcc5v0_sys>;
+	};
+};
+
+&vcc3v3_sys {
+	vin-supply = <&vcc5v0_core>;
+};
+
+&u2phy0_host {
+	phy-supply = <&vcc5v0_usb1>;
+};
+
+&u2phy1_host {
+	phy-supply = <&vcc5v0_usb2>;
+};
+
+&vbus_typec {
+	regulator-always-on;
+	vin-supply = <&vdd_5v>;
 };
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-nanopi4.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-nanopi4.dtsi
index 3e8f1c10ba4f..9c723038d8f8 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-nanopi4.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399-nanopi4.dtsi
@@ -28,21 +28,6 @@
 		#clock-cells = <0>;
 	};
 
-	vdd_5v: vdd-5v {
-		compatible = "regulator-fixed";
-		regulator-always-on;
-		regulator-boot-on;
-		regulator-name = "vdd_5v";
-	};
-
-	vcc5v0_core: vcc5v0-core {
-		compatible = "regulator-fixed";
-		regulator-always-on;
-		regulator-boot-on;
-		regulator-name = "vcc5v0_core";
-		vin-supply = <&vdd_5v>;
-	};
-
 	vcc3v3_sys: vcc3v3-sys {
 		compatible = "regulator-fixed";
 		regulator-always-on;
@@ -50,7 +35,6 @@
 		regulator-min-microvolt = <3300000>;
 		regulator-max-microvolt = <3300000>;
 		regulator-name = "vcc3v3_sys";
-		vin-supply = <&vcc5v0_core>;
 	};
 
 	vcc5v0_sys: vcc5v0-sys {
@@ -63,22 +47,6 @@
 		vin-supply = <&vdd_5v>;
 	};
 
-	vcc5v0_usb1: vcc5v0-usb1 {
-		compatible = "regulator-fixed";
-		regulator-always-on;
-		regulator-boot-on;
-		regulator-name = "vcc5v0_usb1";
-		vin-supply = <&vcc5v0_sys>;
-	};
-
-	vcc5v0_usb2: vcc5v0-usb2 {
-		compatible = "regulator-fixed";
-		regulator-always-on;
-		regulator-boot-on;
-		regulator-name = "vcc5v0_usb2";
-		vin-supply = <&vcc5v0_sys>;
-	};
-
 	/* switched by pmic_sleep */
 	vcc1v8_s3: vcca1v8_s3: vcc1v8-s3 {
 		compatible = "regulator-fixed";
@@ -105,27 +73,9 @@
 
 	vbus_typec: vbus-typec {
 		compatible = "regulator-fixed";
-		enable-active-high;
-		gpios = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>;
-		regulator-always-on;
 		regulator-min-microvolt = <5000000>;
 		regulator-max-microvolt = <5000000>;
 		regulator-name = "vbus_typec";
-		vin-supply = <&vdd_5v>;
-	};
-
-	adc-keys {
-		compatible = "adc-keys";
-		io-channels = <&saradc 1>;
-		io-channel-names = "buttons";
-		keyup-threshold-microvolt = <1800000>;
-		poll-interval = <100>;
-
-		recovery {
-			label = "Recovery";
-			linux,code = <KEY_VENDOR>;
-			press-threshold-microvolt = <18000>;
-		};
 	};
 
 	gpio-keys {
@@ -590,8 +540,7 @@
 
 &sdhci {
 	bus-width = <8>;
-	mmc-hs400-1_8v;
-	mmc-hs400-enhanced-strobe;
+	mmc-hs200-1_8v;
 	non-removable;
 	status = "okay";
 };
@@ -644,7 +593,6 @@
 };
 
 &u2phy0_host {
-	phy-supply = <&vcc5v0_usb1>;
 	status = "okay";
 };
 
@@ -657,7 +605,6 @@
 };
 
 &u2phy1_host {
-	phy-supply = <&vcc5v0_usb2>;
 	status = "okay";
 };
 
-- 
2.17.1

  parent reply	other threads:[~2019-01-08 21:57 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-08 21:57 [PATCH 0/5] NanoPC-T4 (and a bit of NanoPi M4) support Robin Murphy
2019-01-08 21:57 ` [PATCH v5 1/5] arm64: dts: rockchip: Add DT for NanoPC-T4 Robin Murphy
2019-01-10 13:37   ` Heiko Stuebner
2019-01-10 13:42     ` Robin Murphy
2019-01-10 14:18       ` Tomeu Vizoso
2019-01-08 21:57 ` [PATCH 2/5] arm64: dts: rockchip: Add DT for NanoPi M4 Robin Murphy
     [not found]   ` <324b75bbeef2552ddde62f4e1834ac908a45bebd.1546981251.git.robin.murphy-5wv7dgnIgG8@public.gmane.org>
2019-01-08 22:15     ` Heiko Stuebner
2019-01-08 22:35       ` Robin Murphy
2019-01-08 21:57 ` Robin Murphy [this message]
     [not found]   ` <2123f6ef0bc4429fc48709af822289c82a63d46f.1546981251.git.robin.murphy-5wv7dgnIgG8@public.gmane.org>
2019-01-10 13:46     ` [PATCH 3/5] arm64: dts: rockchip: Refine nanopi4 differences Heiko Stuebner
2019-01-08 21:57 ` [PATCH 4/5] arm64: dts: rockchip: Add NanoPC-T4 IR receiver Robin Murphy
     [not found]   ` <a21283067b8d5132df430f3eca6a01ed9eebf1b2.1546981251.git.robin.murphy-5wv7dgnIgG8@public.gmane.org>
2019-01-10 13:49     ` Heiko Stuebner
2019-01-08 21:57 ` [PATCH 5/5] arm64: dts: rockchip: Fix nanopi4 uSD card detect Robin Murphy
     [not found]   ` <83098c7ecc471a77dd89564f5f98fcf30c1ed431.1546981251.git.robin.murphy-5wv7dgnIgG8@public.gmane.org>
2019-01-08 22:42     ` Heiko Stuebner
2019-01-08 23:22       ` Robin Murphy
     [not found]         ` <c2c40662-f7aa-75d5-572e-c58b21170b59-5wv7dgnIgG8@public.gmane.org>
2019-01-10 13:26           ` Heiko Stuebner
2019-01-10 13:53             ` Robin Murphy

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=2123f6ef0bc4429fc48709af822289c82a63d46f.1546981251.git.robin.murphy@arm.com \
    --to=robin.murphy@arm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=heiko@sntech.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=tomeu.vizoso@collabora.com \
    /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 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 NNTP newsgroup(s).