]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
arm64: dts: rockchip: Refine nanopi4 differences
authorRobin Murphy <robin.murphy@arm.com>
Mon, 14 Jan 2019 12:05:32 +0000 (12:05 +0000)
committerHeiko Stuebner <heiko@sntech.de>
Thu, 17 Jan 2019 13:58:54 +0000 (14:58 +0100)
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>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
arch/arm64/boot/dts/rockchip/rk3399-nanopc-t4.dts
arch/arm64/boot/dts/rockchip/rk3399-nanopi-m4.dts
arch/arm64/boot/dts/rockchip/rk3399-nanopi4.dtsi

index af0bb25447090cb3f3bc41af6b28631383530f41..623a03f2548a1362ddb84d3db6b30fe725e355e2 100644 (file)
 / {
        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>;
 };
index 8d3f0ba29c72f4b5fabdcb2760ba1b6bcbb7a9a1..60358ab8c7dfcc7d0b061cdc2f299f99342c4535 100644 (file)
 / {
        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>;
 };
index 3e8f1c10ba4f9b9fb9c2da1a4df1fa1d590abfcb..9c723038d8f8353c36ad9fd1d79858bf2d96dc1e 100644 (file)
@@ -28,21 +28,6 @@ clkin_gmac: external-gmac-clock {
                #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 @@ vcc3v3_sys: vcc3v3-sys {
                regulator-min-microvolt = <3300000>;
                regulator-max-microvolt = <3300000>;
                regulator-name = "vcc3v3_sys";
-               vin-supply = <&vcc5v0_core>;
        };
 
        vcc5v0_sys: vcc5v0-sys {
@@ -63,22 +47,6 @@ vcc5v0_sys: vcc5v0-sys {
                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 @@ vcc3v0_sd: vcc3v0-sd {
 
        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 @@ &saradc {
 
 &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 {
 };
 
 &u2phy0_host {
-       phy-supply = <&vcc5v0_usb1>;
        status = "okay";
 };
 
@@ -657,7 +605,6 @@ &u2phy1 {
 };
 
 &u2phy1_host {
-       phy-supply = <&vcc5v0_usb2>;
        status = "okay";
 };