fanghuilin / rpms / kernel

Forked from rpms/kernel 3 years ago
Clone
e336be
From bfc9bab86121ad657a4564373e5d0ac8b40fb88d Mon Sep 17 00:00:00 2001
e336be
From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
e336be
Date: Mon, 10 Sep 2018 20:43:53 +0530
e336be
Subject: [PATCH 1/5] arm64: dts: rockchip: Split out common nodes for Rock960
e336be
 based boards
e336be
e336be
Since the same family members of Rock960 boards (Rock960 and Ficus)
e336be
share the same configuration, split out the common nodes into a common
e336be
dtsi file for reducing code duplication. The board specific nodes for
e336be
Ficus boards are then placed in corresponding board DTS file.
e336be
e336be
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
e336be
Signed-off-by: Jeremy Cline <jcline@redhat.com>
e336be
---
e336be
 arch/arm64/boot/dts/rockchip/rk3399-ficus.dts | 417 +----------------
e336be
 .../boot/dts/rockchip/rk3399-rock960.dtsi     | 439 ++++++++++++++++++
e336be
 2 files changed, 440 insertions(+), 416 deletions(-)
e336be
 create mode 100644 arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi
e336be
e336be
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-ficus.dts b/arch/arm64/boot/dts/rockchip/rk3399-ficus.dts
e336be
index 85cf0b6bdda9..7f6ec37d5a69 100644
e336be
--- a/arch/arm64/boot/dts/rockchip/rk3399-ficus.dts
e336be
+++ b/arch/arm64/boot/dts/rockchip/rk3399-ficus.dts
e336be
@@ -7,8 +7,7 @@
e336be
  */
e336be
 
e336be
 /dts-v1/;
e336be
-#include "rk3399.dtsi"
e336be
-#include "rk3399-opp.dtsi"
e336be
+#include "rk3399-rock960.dtsi"
e336be
 
e336be
 / {
e336be
 	model = "96boards RK3399 Ficus";
e336be
@@ -25,31 +24,6 @@
e336be
 		#clock-cells = <0>;
e336be
 	};
e336be
 
e336be
-	vcc1v8_s0: vcc1v8-s0 {
e336be
-		compatible = "regulator-fixed";
e336be
-		regulator-name = "vcc1v8_s0";
e336be
-		regulator-min-microvolt = <1800000>;
e336be
-		regulator-max-microvolt = <1800000>;
e336be
-		regulator-always-on;
e336be
-	};
e336be
-
e336be
-	vcc_sys: vcc-sys {
e336be
-		compatible = "regulator-fixed";
e336be
-		regulator-name = "vcc_sys";
e336be
-		regulator-min-microvolt = <5000000>;
e336be
-		regulator-max-microvolt = <5000000>;
e336be
-		regulator-always-on;
e336be
-	};
e336be
-
e336be
-	vcc3v3_sys: vcc3v3-sys {
e336be
-		compatible = "regulator-fixed";
e336be
-		regulator-name = "vcc3v3_sys";
e336be
-		regulator-min-microvolt = <3300000>;
e336be
-		regulator-max-microvolt = <3300000>;
e336be
-		regulator-always-on;
e336be
-		vin-supply = <&vcc_sys>;
e336be
-	};
e336be
-
e336be
 	vcc3v3_pcie: vcc3v3-pcie-regulator {
e336be
 		compatible = "regulator-fixed";
e336be
 		enable-active-high;
e336be
@@ -77,34 +51,6 @@
e336be
 	};
e336be
 };
e336be
 
e336be
-&cpu_l0 {
e336be
-	cpu-supply = <&vdd_cpu_l>;
e336be
-};
e336be
-
e336be
-&cpu_l1 {
e336be
-	cpu-supply = <&vdd_cpu_l>;
e336be
-};
e336be
-
e336be
-&cpu_l2 {
e336be
-	cpu-supply = <&vdd_cpu_l>;
e336be
-};
e336be
-
e336be
-&cpu_l3 {
e336be
-	cpu-supply = <&vdd_cpu_l>;
e336be
-};
e336be
-
e336be
-&cpu_b0 {
e336be
-	cpu-supply = <&vdd_cpu_b>;
e336be
-};
e336be
-
e336be
-&cpu_b1 {
e336be
-	cpu-supply = <&vdd_cpu_b>;
e336be
-};
e336be
-
e336be
-&emmc_phy {
e336be
-	status = "okay";
e336be
-};
e336be
-
e336be
 &gmac {
e336be
 	assigned-clocks = <&cru SCLK_RMII_SRC>;
e336be
 	assigned-clock-parents = <&clkin_gmac>;
e336be
@@ -121,263 +67,6 @@
e336be
 	status = "okay";
e336be
 };
e336be
 
e336be
-&hdmi {
e336be
-	ddc-i2c-bus = <&i2c3>;
e336be
-	pinctrl-names = "default";
e336be
-	pinctrl-0 = <&hdmi_cec>;
e336be
-	status = "okay";
e336be
-};
e336be
-
e336be
-&i2c0 {
e336be
-	clock-frequency = <400000>;
e336be
-	i2c-scl-rising-time-ns = <168>;
e336be
-	i2c-scl-falling-time-ns = <4>;
e336be
-	status = "okay";
e336be
-
e336be
-	vdd_cpu_b: regulator@40 {
e336be
-		compatible = "silergy,syr827";
e336be
-		reg = <0x40>;
e336be
-		fcs,suspend-voltage-selector = <1>;
e336be
-		regulator-name = "vdd_cpu_b";
e336be
-		regulator-min-microvolt = <712500>;
e336be
-		regulator-max-microvolt = <1500000>;
e336be
-		regulator-ramp-delay = <1000>;
e336be
-		regulator-always-on;
e336be
-		regulator-boot-on;
e336be
-		vin-supply = <&vcc_sys>;
e336be
-		status = "okay";
e336be
-
e336be
-		regulator-state-mem {
e336be
-			regulator-off-in-suspend;
e336be
-		};
e336be
-	};
e336be
-
e336be
-	vdd_gpu: regulator@41 {
e336be
-		compatible = "silergy,syr828";
e336be
-		reg = <0x41>;
e336be
-		fcs,suspend-voltage-selector = <1>;
e336be
-		regulator-name = "vdd_gpu";
e336be
-		regulator-min-microvolt = <712500>;
e336be
-		regulator-max-microvolt = <1500000>;
e336be
-		regulator-ramp-delay = <1000>;
e336be
-		regulator-always-on;
e336be
-		regulator-boot-on;
e336be
-		vin-supply = <&vcc_sys>;
e336be
-		regulator-state-mem {
e336be
-			regulator-off-in-suspend;
e336be
-		};
e336be
-	};
e336be
-
e336be
-	rk808: pmic@1b {
e336be
-		compatible = "rockchip,rk808";
e336be
-		reg = <0x1b>;
e336be
-		interrupt-parent = <&gpio1>;
e336be
-		interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
e336be
-		pinctrl-names = "default";
e336be
-		pinctrl-0 = <&pmic_int_l>;
e336be
-		rockchip,system-power-controller;
e336be
-		wakeup-source;
e336be
-		#clock-cells = <1>;
e336be
-		clock-output-names = "xin32k", "rk808-clkout2";
e336be
-
e336be
-		vcc1-supply = <&vcc_sys>;
e336be
-		vcc2-supply = <&vcc_sys>;
e336be
-		vcc3-supply = <&vcc_sys>;
e336be
-		vcc4-supply = <&vcc_sys>;
e336be
-		vcc6-supply = <&vcc_sys>;
e336be
-		vcc7-supply = <&vcc_sys>;
e336be
-		vcc8-supply = <&vcc3v3_sys>;
e336be
-		vcc9-supply = <&vcc_sys>;
e336be
-		vcc10-supply = <&vcc_sys>;
e336be
-		vcc11-supply = <&vcc_sys>;
e336be
-		vcc12-supply = <&vcc3v3_sys>;
e336be
-		vddio-supply = <&vcc_1v8>;
e336be
-
e336be
-		regulators {
e336be
-			vdd_center: DCDC_REG1 {
e336be
-				regulator-name = "vdd_center";
e336be
-				regulator-min-microvolt = <750000>;
e336be
-				regulator-max-microvolt = <1350000>;
e336be
-				regulator-always-on;
e336be
-				regulator-boot-on;
e336be
-				regulator-state-mem {
e336be
-					regulator-off-in-suspend;
e336be
-				};
e336be
-			};
e336be
-
e336be
-			vdd_cpu_l: DCDC_REG2 {
e336be
-				regulator-name = "vdd_cpu_l";
e336be
-				regulator-min-microvolt = <750000>;
e336be
-				regulator-max-microvolt = <1350000>;
e336be
-				regulator-always-on;
e336be
-				regulator-boot-on;
e336be
-				regulator-state-mem {
e336be
-					regulator-off-in-suspend;
e336be
-				};
e336be
-			};
e336be
-
e336be
-			vcc_ddr: DCDC_REG3 {
e336be
-				regulator-name = "vcc_ddr";
e336be
-				regulator-always-on;
e336be
-				regulator-boot-on;
e336be
-				regulator-state-mem {
e336be
-					regulator-on-in-suspend;
e336be
-				};
e336be
-			};
e336be
-
e336be
-			vcc_1v8: DCDC_REG4 {
e336be
-				regulator-name = "vcc_1v8";
e336be
-				regulator-min-microvolt = <1800000>;
e336be
-				regulator-max-microvolt = <1800000>;
e336be
-				regulator-always-on;
e336be
-				regulator-boot-on;
e336be
-				regulator-state-mem {
e336be
-					regulator-on-in-suspend;
e336be
-					regulator-suspend-microvolt = <1800000>;
e336be
-				};
e336be
-			};
e336be
-
e336be
-			vcc1v8_dvp: LDO_REG1 {
e336be
-				regulator-name = "vcc1v8_dvp";
e336be
-				regulator-min-microvolt = <1800000>;
e336be
-				regulator-max-microvolt = <1800000>;
e336be
-				regulator-always-on;
e336be
-				regulator-boot-on;
e336be
-				regulator-state-mem {
e336be
-					regulator-on-in-suspend;
e336be
-					regulator-suspend-microvolt = <1800000>;
e336be
-				};
e336be
-			};
e336be
-
e336be
-			vcca1v8_hdmi: LDO_REG2 {
e336be
-				regulator-name = "vcca1v8_hdmi";
e336be
-				regulator-min-microvolt = <1800000>;
e336be
-				regulator-max-microvolt = <1800000>;
e336be
-				regulator-always-on;
e336be
-				regulator-boot-on;
e336be
-				regulator-state-mem {
e336be
-					regulator-on-in-suspend;
e336be
-					regulator-suspend-microvolt = <1800000>;
e336be
-				};
e336be
-			};
e336be
-
e336be
-			vcca_1v8: LDO_REG3 {
e336be
-				regulator-name = "vcca_1v8";
e336be
-				regulator-min-microvolt = <1800000>;
e336be
-				regulator-max-microvolt = <1800000>;
e336be
-				regulator-always-on;
e336be
-				regulator-boot-on;
e336be
-				regulator-state-mem {
e336be
-					regulator-on-in-suspend;
e336be
-					regulator-suspend-microvolt = <1800000>;
e336be
-				};
e336be
-			};
e336be
-
e336be
-			vcc_sd: LDO_REG4 {
e336be
-				regulator-name = "vcc_sd";
e336be
-				regulator-min-microvolt = <1800000>;
e336be
-				regulator-max-microvolt = <3300000>;
e336be
-				regulator-always-on;
e336be
-				regulator-boot-on;
e336be
-				regulator-state-mem {
e336be
-					regulator-on-in-suspend;
e336be
-					regulator-suspend-microvolt = <3300000>;
e336be
-				};
e336be
-			};
e336be
-
e336be
-			vcc3v0_sd: LDO_REG5 {
e336be
-				regulator-name = "vcc3v0_sd";
e336be
-				regulator-min-microvolt = <3000000>;
e336be
-				regulator-max-microvolt = <3000000>;
e336be
-				regulator-always-on;
e336be
-				regulator-boot-on;
e336be
-				regulator-state-mem {
e336be
-					regulator-on-in-suspend;
e336be
-					regulator-suspend-microvolt = <3000000>;
e336be
-				};
e336be
-			};
e336be
-
e336be
-			vcc_1v5: LDO_REG6 {
e336be
-				regulator-name = "vcc_1v5";
e336be
-				regulator-min-microvolt = <1500000>;
e336be
-				regulator-max-microvolt = <1500000>;
e336be
-				regulator-always-on;
e336be
-				regulator-boot-on;
e336be
-				regulator-state-mem {
e336be
-					regulator-on-in-suspend;
e336be
-					regulator-suspend-microvolt = <1500000>;
e336be
-				};
e336be
-			};
e336be
-
e336be
-			vcca0v9_hdmi: LDO_REG7 {
e336be
-				regulator-name = "vcca0v9_hdmi";
e336be
-				regulator-min-microvolt = <900000>;
e336be
-				regulator-max-microvolt = <900000>;
e336be
-				regulator-always-on;
e336be
-				regulator-boot-on;
e336be
-				regulator-state-mem {
e336be
-					regulator-on-in-suspend;
e336be
-					regulator-suspend-microvolt = <900000>;
e336be
-				};
e336be
-			};
e336be
-
e336be
-			vcc_3v0: LDO_REG8 {
e336be
-				regulator-name = "vcc_3v0";
e336be
-				regulator-min-microvolt = <3000000>;
e336be
-				regulator-max-microvolt = <3000000>;
e336be
-				regulator-always-on;
e336be
-				regulator-boot-on;
e336be
-				regulator-state-mem {
e336be
-					regulator-on-in-suspend;
e336be
-					regulator-suspend-microvolt = <3000000>;
e336be
-				};
e336be
-			};
e336be
-
e336be
-			vcc3v3_s3: SWITCH_REG1 {
e336be
-				regulator-name = "vcc3v3_s3";
e336be
-				regulator-always-on;
e336be
-				regulator-boot-on;
e336be
-				regulator-state-mem {
e336be
-					regulator-on-in-suspend;
e336be
-				};
e336be
-			};
e336be
-
e336be
-			vcc3v3_s0: SWITCH_REG2 {
e336be
-				regulator-name = "vcc3v3_s0";
e336be
-				regulator-always-on;
e336be
-				regulator-boot-on;
e336be
-				regulator-state-mem {
e336be
-					regulator-on-in-suspend;
e336be
-				};
e336be
-			};
e336be
-		};
e336be
-	};
e336be
-};
e336be
-
e336be
-&i2c1 {
e336be
-	status = "okay";
e336be
-};
e336be
-
e336be
-&i2c2 {
e336be
-	status = "okay";
e336be
-};
e336be
-
e336be
-&i2c3 {
e336be
-	status = "okay";
e336be
-};
e336be
-
e336be
-&i2c4 {
e336be
-	status = "okay";
e336be
-};
e336be
-
e336be
-&io_domains {
e336be
-	bt656-supply = <&vcc1v8_s0>; /* bt656_gpio2ab_ms */
e336be
-	audio-supply = <&vcc1v8_s0>; /* audio_gpio3d4a_ms */
e336be
-	sdmmc-supply = <&vcc_sd>; /* sdmmc_gpio4b_ms */
e336be
-	gpio1830-supply = <&vcc_3v0>; /* gpio1833_gpio4cd_ms */
e336be
-	status = "okay";
e336be
-};
e336be
-
e336be
 &pcie_phy {
e336be
 	status = "okay";
e336be
 };
e336be
@@ -391,11 +80,6 @@
e336be
 	status = "okay";
e336be
 };
e336be
 
e336be
-&pmu_io_domains {
e336be
-	pmu1830-supply = <&vcc_1v8>;
e336be
-	status = "okay";
e336be
-};
e336be
-
e336be
 &pinctrl {
e336be
 	gmac {
e336be
 		rgmii_sleep_pins: rgmii-sleep-pins {
e336be
@@ -404,31 +88,6 @@
e336be
 		};
e336be
 	};
e336be
 
e336be
-	sdmmc {
e336be
-		sdmmc_bus1: sdmmc-bus1 {
e336be
-			rockchip,pins =
e336be
-				<4 8 RK_FUNC_1 &pcfg_pull_up_8ma>;
e336be
-		};
e336be
-
e336be
-		sdmmc_bus4: sdmmc-bus4 {
e336be
-			rockchip,pins =
e336be
-				<4 8 RK_FUNC_1 &pcfg_pull_up_8ma>,
e336be
-				<4 9 RK_FUNC_1 &pcfg_pull_up_8ma>,
e336be
-				<4 10 RK_FUNC_1 &pcfg_pull_up_8ma>,
e336be
-				<4 11 RK_FUNC_1 &pcfg_pull_up_8ma>;
e336be
-		};
e336be
-
e336be
-		sdmmc_clk: sdmmc-clk {
e336be
-			rockchip,pins =
e336be
-				<4 12 RK_FUNC_1 &pcfg_pull_none_18ma>;
e336be
-		};
e336be
-
e336be
-		sdmmc_cmd: sdmmc-cmd {
e336be
-			rockchip,pins =
e336be
-				<4 13 RK_FUNC_1 &pcfg_pull_up_8ma>;
e336be
-		};
e336be
-	};
e336be
-
e336be
 	pcie {
e336be
 		pcie_drv: pcie-drv {
e336be
 			rockchip,pins =
e336be
@@ -436,23 +95,6 @@
e336be
 			};
e336be
 	};
e336be
 
e336be
-	pmic {
e336be
-		pmic_int_l: pmic-int-l {
e336be
-			rockchip,pins =
e336be
-				<1 21 RK_FUNC_GPIO &pcfg_pull_up>;
e336be
-		};
e336be
-
e336be
-		vsel1_gpio: vsel1-gpio {
e336be
-			rockchip,pins =
e336be
-				<1 17 RK_FUNC_GPIO &pcfg_pull_down>;
e336be
-		};
e336be
-
e336be
-		vsel2_gpio: vsel2-gpio {
e336be
-			rockchip,pins =
e336be
-				<1 14 RK_FUNC_GPIO &pcfg_pull_down>;
e336be
-		};
e336be
-	};
e336be
-
e336be
 	usb2 {
e336be
 		host_vbus_drv: host-vbus-drv {
e336be
 			rockchip,pins =
e336be
@@ -461,37 +103,6 @@
e336be
 	};
e336be
 };
e336be
 
e336be
-&pwm2 {
e336be
-	status = "okay";
e336be
-};
e336be
-
e336be
-&pwm3 {
e336be
-	status = "okay";
e336be
-};
e336be
-
e336be
-&sdhci {
e336be
-	bus-width = <8>;
e336be
-	mmc-hs400-1_8v;
e336be
-	mmc-hs400-enhanced-strobe;
e336be
-	non-removable;
e336be
-	status = "okay";
e336be
-};
e336be
-
e336be
-&sdmmc {
e336be
-	bus-width = <4>;
e336be
-	cap-mmc-highspeed;
e336be
-	cap-sd-highspeed;
e336be
-	clock-frequency = <100000000>;
e336be
-	clock-freq-min-max = <100000 100000000>;
e336be
-	disable-wp;
e336be
-	sd-uhs-sdr104;
e336be
-	vqmmc-supply = <&vcc_sd>;
e336be
-	card-detect-delay = <800>;
e336be
-	pinctrl-names = "default";
e336be
-	pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
e336be
-	status = "okay";
e336be
-};
e336be
-
e336be
 &tcphy0 {
e336be
 	status = "okay";
e336be
 };
e336be
@@ -526,16 +137,6 @@
e336be
 	status = "okay";
e336be
 };
e336be
 
e336be
-&uart0 {
e336be
-	pinctrl-names = "default";
e336be
-	pinctrl-0 = <&uart0_xfer &uart0_cts>;
e336be
-	status = "okay";
e336be
-};
e336be
-
e336be
-&uart2 {
e336be
-	status = "okay";
e336be
-};
e336be
-
e336be
 &usb_host0_ehci {
e336be
 	status = "okay";
e336be
 };
e336be
@@ -569,19 +170,3 @@
e336be
 	status = "okay";
e336be
 	dr_mode = "host";
e336be
 };
e336be
-
e336be
-&vopb {
e336be
-	status = "okay";
e336be
-};
e336be
-
e336be
-&vopb_mmu {
e336be
-	status = "okay";
e336be
-};
e336be
-
e336be
-&vopl {
e336be
-	status = "okay";
e336be
-};
e336be
-
e336be
-&vopl_mmu {
e336be
-	status = "okay";
e336be
-};
e336be
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi
e336be
new file mode 100644
e336be
index 000000000000..5a5d8e28ef55
e336be
--- /dev/null
e336be
+++ b/arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi
e336be
@@ -0,0 +1,439 @@
e336be
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
e336be
+/*
e336be
+ * Copyright (c) 2018 Collabora Ltd.
e336be
+ * Copyright (c) 2018 Fuzhou Rockchip Electronics Co., Ltd.
e336be
+ * Copyright (c) 2018 Linaro Ltd.
e336be
+ */
e336be
+
e336be
+#include "rk3399.dtsi"
e336be
+#include "rk3399-opp.dtsi"
e336be
+
e336be
+/ {
e336be
+	vcc1v8_s0: vcc1v8-s0 {
e336be
+		compatible = "regulator-fixed";
e336be
+		regulator-name = "vcc1v8_s0";
e336be
+		regulator-min-microvolt = <1800000>;
e336be
+		regulator-max-microvolt = <1800000>;
e336be
+		regulator-always-on;
e336be
+	};
e336be
+
e336be
+	vcc_sys: vcc-sys {
e336be
+		compatible = "regulator-fixed";
e336be
+		regulator-name = "vcc_sys";
e336be
+		regulator-min-microvolt = <5000000>;
e336be
+		regulator-max-microvolt = <5000000>;
e336be
+		regulator-always-on;
e336be
+	};
e336be
+
e336be
+	vcc3v3_sys: vcc3v3-sys {
e336be
+		compatible = "regulator-fixed";
e336be
+		regulator-name = "vcc3v3_sys";
e336be
+		regulator-min-microvolt = <3300000>;
e336be
+		regulator-max-microvolt = <3300000>;
e336be
+		regulator-always-on;
e336be
+		vin-supply = <&vcc_sys>;
e336be
+	};
e336be
+
e336be
+	vdd_log: vdd-log {
e336be
+		compatible = "pwm-regulator";
e336be
+		pwms = <&pwm2 0 25000 0>;
e336be
+		regulator-name = "vdd_log";
e336be
+		regulator-min-microvolt = <800000>;
e336be
+		regulator-max-microvolt = <1400000>;
e336be
+		regulator-always-on;
e336be
+		regulator-boot-on;
e336be
+		vin-supply = <&vcc_sys>;
e336be
+	};
e336be
+
e336be
+};
e336be
+
e336be
+&cpu_l0 {
e336be
+	cpu-supply = <&vdd_cpu_l>;
e336be
+};
e336be
+
e336be
+&cpu_l1 {
e336be
+	cpu-supply = <&vdd_cpu_l>;
e336be
+};
e336be
+
e336be
+&cpu_l2 {
e336be
+	cpu-supply = <&vdd_cpu_l>;
e336be
+};
e336be
+
e336be
+&cpu_l3 {
e336be
+	cpu-supply = <&vdd_cpu_l>;
e336be
+};
e336be
+
e336be
+&cpu_b0 {
e336be
+	cpu-supply = <&vdd_cpu_b>;
e336be
+};
e336be
+
e336be
+&cpu_b1 {
e336be
+	cpu-supply = <&vdd_cpu_b>;
e336be
+};
e336be
+
e336be
+&emmc_phy {
e336be
+	status = "okay";
e336be
+};
e336be
+
e336be
+&hdmi {
e336be
+	ddc-i2c-bus = <&i2c3>;
e336be
+	pinctrl-names = "default";
e336be
+	pinctrl-0 = <&hdmi_cec>;
e336be
+	status = "okay";
e336be
+};
e336be
+
e336be
+&i2c0 {
e336be
+	clock-frequency = <400000>;
e336be
+	i2c-scl-rising-time-ns = <168>;
e336be
+	i2c-scl-falling-time-ns = <4>;
e336be
+	status = "okay";
e336be
+
e336be
+	vdd_cpu_b: regulator@40 {
e336be
+		compatible = "silergy,syr827";
e336be
+		reg = <0x40>;
e336be
+		fcs,suspend-voltage-selector = <1>;
e336be
+		regulator-name = "vdd_cpu_b";
e336be
+		regulator-min-microvolt = <712500>;
e336be
+		regulator-max-microvolt = <1500000>;
e336be
+		regulator-ramp-delay = <1000>;
e336be
+		regulator-always-on;
e336be
+		regulator-boot-on;
e336be
+		vin-supply = <&vcc_sys>;
e336be
+		status = "okay";
e336be
+
e336be
+		regulator-state-mem {
e336be
+			regulator-off-in-suspend;
e336be
+		};
e336be
+	};
e336be
+
e336be
+	vdd_gpu: regulator@41 {
e336be
+		compatible = "silergy,syr828";
e336be
+		reg = <0x41>;
e336be
+		fcs,suspend-voltage-selector = <1>;
e336be
+		regulator-name = "vdd_gpu";
e336be
+		regulator-min-microvolt = <712500>;
e336be
+		regulator-max-microvolt = <1500000>;
e336be
+		regulator-ramp-delay = <1000>;
e336be
+		regulator-always-on;
e336be
+		regulator-boot-on;
e336be
+		vin-supply = <&vcc_sys>;
e336be
+		regulator-state-mem {
e336be
+			regulator-off-in-suspend;
e336be
+		};
e336be
+	};
e336be
+
e336be
+	rk808: pmic@1b {
e336be
+		compatible = "rockchip,rk808";
e336be
+		reg = <0x1b>;
e336be
+		interrupt-parent = <&gpio1>;
e336be
+		interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
e336be
+		pinctrl-names = "default";
e336be
+		pinctrl-0 = <&pmic_int_l>;
e336be
+		rockchip,system-power-controller;
e336be
+		wakeup-source;
e336be
+		#clock-cells = <1>;
e336be
+		clock-output-names = "xin32k", "rk808-clkout2";
e336be
+
e336be
+		vcc1-supply = <&vcc_sys>;
e336be
+		vcc2-supply = <&vcc_sys>;
e336be
+		vcc3-supply = <&vcc_sys>;
e336be
+		vcc4-supply = <&vcc_sys>;
e336be
+		vcc6-supply = <&vcc_sys>;
e336be
+		vcc7-supply = <&vcc_sys>;
e336be
+		vcc8-supply = <&vcc3v3_sys>;
e336be
+		vcc9-supply = <&vcc_sys>;
e336be
+		vcc10-supply = <&vcc_sys>;
e336be
+		vcc11-supply = <&vcc_sys>;
e336be
+		vcc12-supply = <&vcc3v3_sys>;
e336be
+		vddio-supply = <&vcc_1v8>;
e336be
+
e336be
+		regulators {
e336be
+			vdd_center: DCDC_REG1 {
e336be
+				regulator-name = "vdd_center";
e336be
+				regulator-min-microvolt = <750000>;
e336be
+				regulator-max-microvolt = <1350000>;
e336be
+				regulator-always-on;
e336be
+				regulator-boot-on;
e336be
+				regulator-state-mem {
e336be
+					regulator-off-in-suspend;
e336be
+				};
e336be
+			};
e336be
+
e336be
+			vdd_cpu_l: DCDC_REG2 {
e336be
+				regulator-name = "vdd_cpu_l";
e336be
+				regulator-min-microvolt = <750000>;
e336be
+				regulator-max-microvolt = <1350000>;
e336be
+				regulator-always-on;
e336be
+				regulator-boot-on;
e336be
+				regulator-state-mem {
e336be
+					regulator-off-in-suspend;
e336be
+				};
e336be
+			};
e336be
+
e336be
+			vcc_ddr: DCDC_REG3 {
e336be
+				regulator-name = "vcc_ddr";
e336be
+				regulator-always-on;
e336be
+				regulator-boot-on;
e336be
+				regulator-state-mem {
e336be
+					regulator-on-in-suspend;
e336be
+				};
e336be
+			};
e336be
+
e336be
+			vcc_1v8: DCDC_REG4 {
e336be
+				regulator-name = "vcc_1v8";
e336be
+				regulator-min-microvolt = <1800000>;
e336be
+				regulator-max-microvolt = <1800000>;
e336be
+				regulator-always-on;
e336be
+				regulator-boot-on;
e336be
+				regulator-state-mem {
e336be
+					regulator-on-in-suspend;
e336be
+					regulator-suspend-microvolt = <1800000>;
e336be
+				};
e336be
+			};
e336be
+
e336be
+			vcc1v8_dvp: LDO_REG1 {
e336be
+				regulator-name = "vcc1v8_dvp";
e336be
+				regulator-min-microvolt = <1800000>;
e336be
+				regulator-max-microvolt = <1800000>;
e336be
+				regulator-always-on;
e336be
+				regulator-boot-on;
e336be
+				regulator-state-mem {
e336be
+					regulator-on-in-suspend;
e336be
+					regulator-suspend-microvolt = <1800000>;
e336be
+				};
e336be
+			};
e336be
+
e336be
+			vcca1v8_hdmi: LDO_REG2 {
e336be
+				regulator-name = "vcca1v8_hdmi";
e336be
+				regulator-min-microvolt = <1800000>;
e336be
+				regulator-max-microvolt = <1800000>;
e336be
+				regulator-always-on;
e336be
+				regulator-boot-on;
e336be
+				regulator-state-mem {
e336be
+					regulator-on-in-suspend;
e336be
+					regulator-suspend-microvolt = <1800000>;
e336be
+				};
e336be
+			};
e336be
+
e336be
+			vcca_1v8: LDO_REG3 {
e336be
+				regulator-name = "vcca_1v8";
e336be
+				regulator-min-microvolt = <1800000>;
e336be
+				regulator-max-microvolt = <1800000>;
e336be
+				regulator-always-on;
e336be
+				regulator-boot-on;
e336be
+				regulator-state-mem {
e336be
+					regulator-on-in-suspend;
e336be
+					regulator-suspend-microvolt = <1800000>;
e336be
+				};
e336be
+			};
e336be
+
e336be
+			vcc_sd: LDO_REG4 {
e336be
+				regulator-name = "vcc_sd";
e336be
+				regulator-min-microvolt = <1800000>;
e336be
+				regulator-max-microvolt = <3300000>;
e336be
+				regulator-always-on;
e336be
+				regulator-boot-on;
e336be
+				regulator-state-mem {
e336be
+					regulator-on-in-suspend;
e336be
+					regulator-suspend-microvolt = <3300000>;
e336be
+				};
e336be
+			};
e336be
+
e336be
+			vcc3v0_sd: LDO_REG5 {
e336be
+				regulator-name = "vcc3v0_sd";
e336be
+				regulator-min-microvolt = <3000000>;
e336be
+				regulator-max-microvolt = <3000000>;
e336be
+				regulator-always-on;
e336be
+				regulator-boot-on;
e336be
+				regulator-state-mem {
e336be
+					regulator-on-in-suspend;
e336be
+					regulator-suspend-microvolt = <3000000>;
e336be
+				};
e336be
+			};
e336be
+
e336be
+			vcc_1v5: LDO_REG6 {
e336be
+				regulator-name = "vcc_1v5";
e336be
+				regulator-min-microvolt = <1500000>;
e336be
+				regulator-max-microvolt = <1500000>;
e336be
+				regulator-always-on;
e336be
+				regulator-boot-on;
e336be
+				regulator-state-mem {
e336be
+					regulator-on-in-suspend;
e336be
+					regulator-suspend-microvolt = <1500000>;
e336be
+				};
e336be
+			};
e336be
+
e336be
+			vcca0v9_hdmi: LDO_REG7 {
e336be
+				regulator-name = "vcca0v9_hdmi";
e336be
+				regulator-min-microvolt = <900000>;
e336be
+				regulator-max-microvolt = <900000>;
e336be
+				regulator-always-on;
e336be
+				regulator-boot-on;
e336be
+				regulator-state-mem {
e336be
+					regulator-on-in-suspend;
e336be
+					regulator-suspend-microvolt = <900000>;
e336be
+				};
e336be
+			};
e336be
+
e336be
+			vcc_3v0: LDO_REG8 {
e336be
+				regulator-name = "vcc_3v0";
e336be
+				regulator-min-microvolt = <3000000>;
e336be
+				regulator-max-microvolt = <3000000>;
e336be
+				regulator-always-on;
e336be
+				regulator-boot-on;
e336be
+				regulator-state-mem {
e336be
+					regulator-on-in-suspend;
e336be
+					regulator-suspend-microvolt = <3000000>;
e336be
+				};
e336be
+			};
e336be
+
e336be
+			vcc3v3_s3: SWITCH_REG1 {
e336be
+				regulator-name = "vcc3v3_s3";
e336be
+				regulator-always-on;
e336be
+				regulator-boot-on;
e336be
+				regulator-state-mem {
e336be
+					regulator-on-in-suspend;
e336be
+				};
e336be
+			};
e336be
+
e336be
+			vcc3v3_s0: SWITCH_REG2 {
e336be
+				regulator-name = "vcc3v3_s0";
e336be
+				regulator-always-on;
e336be
+				regulator-boot-on;
e336be
+				regulator-state-mem {
e336be
+					regulator-on-in-suspend;
e336be
+				};
e336be
+			};
e336be
+		};
e336be
+	};
e336be
+};
e336be
+
e336be
+&i2c1 {
e336be
+	status = "okay";
e336be
+};
e336be
+
e336be
+&i2c2 {
e336be
+	status = "okay";
e336be
+};
e336be
+
e336be
+&i2c3 {
e336be
+	status = "okay";
e336be
+};
e336be
+
e336be
+&i2c4 {
e336be
+	status = "okay";
e336be
+};
e336be
+
e336be
+&io_domains {
e336be
+	bt656-supply = <&vcc1v8_s0>; /* bt656_gpio2ab_ms */
e336be
+	audio-supply = <&vcc1v8_s0>; /* audio_gpio3d4a_ms */
e336be
+	sdmmc-supply = <&vcc_sd>; /* sdmmc_gpio4b_ms */
e336be
+	gpio1830-supply = <&vcc_3v0>; /* gpio1833_gpio4cd_ms */
e336be
+	status = "okay";
e336be
+};
e336be
+
e336be
+&pmu_io_domains {
e336be
+	pmu1830-supply = <&vcc_1v8>;
e336be
+	status = "okay";
e336be
+};
e336be
+
e336be
+&pinctrl {
e336be
+	sdmmc {
e336be
+		sdmmc_bus1: sdmmc-bus1 {
e336be
+			rockchip,pins =
e336be
+				<4 8 RK_FUNC_1 &pcfg_pull_up_8ma>;
e336be
+		};
e336be
+
e336be
+		sdmmc_bus4: sdmmc-bus4 {
e336be
+			rockchip,pins =
e336be
+				<4 8 RK_FUNC_1 &pcfg_pull_up_8ma>,
e336be
+				<4 9 RK_FUNC_1 &pcfg_pull_up_8ma>,
e336be
+				<4 10 RK_FUNC_1 &pcfg_pull_up_8ma>,
e336be
+				<4 11 RK_FUNC_1 &pcfg_pull_up_8ma>;
e336be
+		};
e336be
+
e336be
+		sdmmc_clk: sdmmc-clk {
e336be
+			rockchip,pins =
e336be
+				<4 12 RK_FUNC_1 &pcfg_pull_none_18ma>;
e336be
+		};
e336be
+
e336be
+		sdmmc_cmd: sdmmc-cmd {
e336be
+			rockchip,pins =
e336be
+				<4 13 RK_FUNC_1 &pcfg_pull_up_8ma>;
e336be
+		};
e336be
+	};
e336be
+
e336be
+	pmic {
e336be
+		pmic_int_l: pmic-int-l {
e336be
+			rockchip,pins =
e336be
+				<1 21 RK_FUNC_GPIO &pcfg_pull_up>;
e336be
+		};
e336be
+
e336be
+		vsel1_gpio: vsel1-gpio {
e336be
+			rockchip,pins =
e336be
+				<1 17 RK_FUNC_GPIO &pcfg_pull_down>;
e336be
+		};
e336be
+
e336be
+		vsel2_gpio: vsel2-gpio {
e336be
+			rockchip,pins =
e336be
+				<1 14 RK_FUNC_GPIO &pcfg_pull_down>;
e336be
+		};
e336be
+	};
e336be
+};
e336be
+
e336be
+&pwm2 {
e336be
+	status = "okay";
e336be
+};
e336be
+
e336be
+&pwm3 {
e336be
+	status = "okay";
e336be
+};
e336be
+
e336be
+&sdhci {
e336be
+	bus-width = <8>;
e336be
+	mmc-hs400-1_8v;
e336be
+	mmc-hs400-enhanced-strobe;
e336be
+	non-removable;
e336be
+	status = "okay";
e336be
+};
e336be
+
e336be
+&sdmmc {
e336be
+	bus-width = <4>;
e336be
+	cap-mmc-highspeed;
e336be
+	cap-sd-highspeed;
e336be
+	clock-frequency = <100000000>;
e336be
+	clock-freq-min-max = <100000 100000000>;
e336be
+	disable-wp;
e336be
+	sd-uhs-sdr104;
e336be
+	vqmmc-supply = <&vcc_sd>;
e336be
+	card-detect-delay = <800>;
e336be
+	pinctrl-names = "default";
e336be
+	pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
e336be
+	status = "okay";
e336be
+};
e336be
+
e336be
+&uart0 {
e336be
+	pinctrl-names = "default";
e336be
+	pinctrl-0 = <&uart0_xfer &uart0_cts>;
e336be
+	status = "okay";
e336be
+};
e336be
+
e336be
+&uart2 {
e336be
+	status = "okay";
e336be
+};
e336be
+
e336be
+&vopb {
e336be
+	status = "okay";
e336be
+};
e336be
+
e336be
+&vopb_mmu {
e336be
+	status = "okay";
e336be
+};
e336be
+
e336be
+&vopl {
e336be
+	status = "okay";
e336be
+};
e336be
+
e336be
+&vopl_mmu {
e336be
+	status = "okay";
e336be
+};
e336be
-- 
e336be
2.19.2
e336be
e336be
From 77f6a861cf9294e13720e87d0c43ce3494f45c90 Mon Sep 17 00:00:00 2001
e336be
From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
e336be
Date: Mon, 10 Sep 2018 20:43:54 +0530
e336be
Subject: [PATCH 2/5] dt-bindings: arm: rockchip: Add binding for Rock960 board
e336be
e336be
Add devicetree binding for Rock960 board from Vamrs Limited.
e336be
e336be
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
e336be
Signed-off-by: Jeremy Cline <jcline@redhat.com>
e336be
---
e336be
 Documentation/devicetree/bindings/arm/rockchip.txt | 4 ++++
e336be
 1 file changed, 4 insertions(+)
e336be
e336be
diff --git a/Documentation/devicetree/bindings/arm/rockchip.txt b/Documentation/devicetree/bindings/arm/rockchip.txt
e336be
index acfd3c773dd0..aaad9e2ff9a3 100644
e336be
--- a/Documentation/devicetree/bindings/arm/rockchip.txt
e336be
+++ b/Documentation/devicetree/bindings/arm/rockchip.txt
e336be
@@ -5,6 +5,10 @@ Rockchip platforms device tree bindings
e336be
     Required root node properties:
e336be
       - compatible = "vamrs,ficus", "rockchip,rk3399";
e336be
 
e336be
+- 96boards RK3399 Rock960 (ROCK960 Consumer Edition)
e336be
+    Required root node properties:
e336be
+      - compatible = "vamrs,rk3399-rock960", "rockchip,rk3399";
e336be
+
e336be
 - Amarula Vyasa RK3288 board
e336be
     Required root node properties:
e336be
       - compatible = "amarula,vyasa-rk3288", "rockchip,rk3288";
e336be
-- 
e336be
2.19.2
e336be
e336be
From 7feb0235145ed6f81527dc7b66507d72fad7bdda Mon Sep 17 00:00:00 2001
e336be
From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
e336be
Date: Mon, 10 Sep 2018 20:43:55 +0530
e336be
Subject: [PATCH 3/5] arm64: boot: dts: rockchip: Add support for Rock960 board
e336be
e336be
Add devicetree support for Rock960 board, one of the Consumer Edition
e336be
boards of the 96Boards family. This board support utilizes the common
e336be
Rock960 family board support that includes Ficus 96Board.
e336be
e336be
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
e336be
Signed-off-by: Jeremy Cline <jcline@redhat.com>
e336be
---
e336be
 arch/arm64/boot/dts/rockchip/Makefile         |   1 +
e336be
 .../boot/dts/rockchip/rk3399-rock960.dts      | 139 ++++++++++++++++++
e336be
 2 files changed, 140 insertions(+)
e336be
 create mode 100644 arch/arm64/boot/dts/rockchip/rk3399-rock960.dts
e336be
e336be
diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile
e336be
index b0092d95b574..57c0d76458e6 100644
e336be
--- a/arch/arm64/boot/dts/rockchip/Makefile
e336be
+++ b/arch/arm64/boot/dts/rockchip/Makefile
e336be
@@ -14,5 +14,6 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-firefly.dtb
e336be
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-gru-bob.dtb
e336be
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-gru-kevin.dtb
e336be
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-puma-haikou.dtb
e336be
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-rock960.dtb
e336be
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-sapphire.dtb
e336be
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-sapphire-excavator.dtb
e336be
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rock960.dts b/arch/arm64/boot/dts/rockchip/rk3399-rock960.dts
e336be
new file mode 100644
e336be
index 000000000000..281f3d79b38e
e336be
--- /dev/null
e336be
+++ b/arch/arm64/boot/dts/rockchip/rk3399-rock960.dts
e336be
@@ -0,0 +1,139 @@
e336be
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
e336be
+/*
e336be
+ * Copyright (c) 2018 Linaro Ltd.
e336be
+ */
e336be
+
e336be
+/dts-v1/;
e336be
+#include "rk3399-rock960.dtsi"
e336be
+
e336be
+/ {
e336be
+	model = "96boards Rock960";
e336be
+	compatible = "vamrs,rk3399-rock960", "rockchip,rk3399";
e336be
+
e336be
+	chosen {
e336be
+		stdout-path = "serial2:1500000n8";
e336be
+	};
e336be
+
e336be
+	vcc3v3_pcie: vcc3v3-pcie-regulator {
e336be
+		compatible = "regulator-fixed";
e336be
+		enable-active-high;
e336be
+		gpio = <&gpio2 5 GPIO_ACTIVE_HIGH>;
e336be
+		pinctrl-names = "default";
e336be
+		pinctrl-0 = <&pcie_drv>;
e336be
+		regulator-boot-on;
e336be
+		regulator-name = "vcc3v3_pcie";
e336be
+		regulator-min-microvolt = <3300000>;
e336be
+		regulator-max-microvolt = <3300000>;
e336be
+		vin-supply = <&vcc3v3_sys>;
e336be
+	};
e336be
+
e336be
+	vcc5v0_host: vcc5v0-host-regulator {
e336be
+		compatible = "regulator-fixed";
e336be
+		enable-active-high;
e336be
+		gpio = <&gpio4 25 GPIO_ACTIVE_HIGH>;
e336be
+		pinctrl-names = "default";
e336be
+		pinctrl-0 = <&host_vbus_drv>;
e336be
+		regulator-name = "vcc5v0_host";
e336be
+		regulator-min-microvolt = <5000000>;
e336be
+		regulator-max-microvolt = <5000000>;
e336be
+		regulator-always-on;
e336be
+		vin-supply = <&vcc_sys>;
e336be
+	};
e336be
+};
e336be
+
e336be
+&pinctrl {
e336be
+	pcie {
e336be
+		pcie_drv: pcie-drv {
e336be
+			rockchip,pins =
e336be
+				<2 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
e336be
+			};
e336be
+	};
e336be
+
e336be
+	usb2 {
e336be
+		host_vbus_drv: host-vbus-drv {
e336be
+			rockchip,pins =
e336be
+				<4 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>;
e336be
+		};
e336be
+	};
e336be
+};
e336be
+
e336be
+&pcie_phy {
e336be
+	status = "okay";
e336be
+};
e336be
+
e336be
+&pcie0 {
e336be
+	ep-gpios = <&gpio2 RK_PA2 GPIO_ACTIVE_HIGH>;
e336be
+	num-lanes = <4>;
e336be
+	pinctrl-names = "default";
e336be
+	pinctrl-0 = <&pcie_clkreqn_cpm>;
e336be
+	vpcie3v3-supply = <&vcc3v3_pcie>;
e336be
+	status = "okay";
e336be
+};
e336be
+
e336be
+&tcphy0 {
e336be
+	status = "okay";
e336be
+};
e336be
+
e336be
+&tcphy1 {
e336be
+	status = "okay";
e336be
+};
e336be
+
e336be
+&u2phy0 {
e336be
+	status = "okay";
e336be
+};
e336be
+
e336be
+&u2phy1 {
e336be
+	status = "okay";
e336be
+};
e336be
+
e336be
+&u2phy0_host {
e336be
+	phy-supply = <&vcc5v0_host>;
e336be
+	status = "okay";
e336be
+};
e336be
+
e336be
+&u2phy1_host {
e336be
+	phy-supply = <&vcc5v0_host>;
e336be
+	status = "okay";
e336be
+};
e336be
+
e336be
+&u2phy0_otg {
e336be
+	status = "okay";
e336be
+};
e336be
+
e336be
+&u2phy1_otg {
e336be
+	status = "okay";
e336be
+};
e336be
+
e336be
+&usb_host0_ehci {
e336be
+	status = "okay";
e336be
+};
e336be
+
e336be
+&usb_host0_ohci {
e336be
+	status = "okay";
e336be
+};
e336be
+
e336be
+&usb_host1_ehci {
e336be
+	status = "okay";
e336be
+};
e336be
+
e336be
+&usb_host1_ohci {
e336be
+	status = "okay";
e336be
+};
e336be
+
e336be
+&usbdrd3_0 {
e336be
+	status = "okay";
e336be
+};
e336be
+
e336be
+&usbdrd_dwc3_0 {
e336be
+	status = "okay";
e336be
+	dr_mode = "otg";
e336be
+};
e336be
+
e336be
+&usbdrd3_1 {
e336be
+	status = "okay";
e336be
+};
e336be
+
e336be
+&usbdrd_dwc3_1 {
e336be
+	status = "okay";
e336be
+	dr_mode = "host";
e336be
+};
e336be
-- 
e336be
2.19.2
e336be
e336be
From 3e38e9e596d44926a3d2abd2c7c1ff0515ef9517 Mon Sep 17 00:00:00 2001
e336be
From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
e336be
Date: Mon, 10 Sep 2018 20:43:56 +0530
e336be
Subject: [PATCH 4/5] arm64: dts: rockchip: Enable SD card detection for
e336be
 Rock960 boards
e336be
e336be
For proper working of SD cards, let's add the Card Detect GPIO property
e336be
to the common devicetree for Rock960 family boards.
e336be
e336be
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
e336be
Signed-off-by: Jeremy Cline <jcline@redhat.com>
e336be
---
e336be
 arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi | 1 +
e336be
 1 file changed, 1 insertion(+)
e336be
e336be
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi
e336be
index 5a5d8e28ef55..f68254831ad9 100644
e336be
--- a/arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi
e336be
+++ b/arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi
e336be
@@ -403,6 +403,7 @@
e336be
 	cap-sd-highspeed;
e336be
 	clock-frequency = <100000000>;
e336be
 	clock-freq-min-max = <100000 100000000>;
e336be
+	cd-gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
e336be
 	disable-wp;
e336be
 	sd-uhs-sdr104;
e336be
 	vqmmc-supply = <&vcc_sd>;
e336be
-- 
e336be
2.19.2
e336be
e336be
From cfe6b83c53aafd81f2b55c9ff25991f499edc49a Mon Sep 17 00:00:00 2001
e336be
From: Daniel Lezcano <daniel.lezcano@linaro.org>
e336be
Date: Tue, 16 Oct 2018 16:00:20 +0200
e336be
Subject: [PATCH 5/5] DT: rockchip: Fix stability issues with the 'performance'
e336be
 governor on rock960
e336be
e336be
When the performance governor is set as default, the rock960 hangs
e336be
around one minute after booting, whatever the activity is (idle, key
e336be
pressed, loaded, ...).
e336be
e336be
Based on the commit log found at https://patchwork.kernel.org/patch/10092377/
e336be
e336be
"vdd_log has no consumer and therefore will not be set to a specific
e336be
voltage. Still the PWM output pin gets configured and thence the vdd_log
e336be
output voltage will changed from it's default. Depending on the idle
e336be
state of the PWM this will slightly over or undervoltage the logic supply
e336be
of the RK3399 and cause instability with GbE (undervoltage) and PCIe
e336be
(overvoltage). Since the default value set by a voltage divider is the
e336be
correct supply voltage and we don't need to change it during runtime we
e336be
remove the rail from the devicetree completely so the PWM pin will not
e336be
be configured."
e336be
e336be
After removing the vdd-log from the rock960's specific DT, the board
e336be
does no longer hang and shows a stable behavior.
e336be
e336be
Apply the same change for the rock960 by removing the vdd-log from the
e336be
DT.
e336be
e336be
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
e336be
Tested-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
e336be
Signed-off-by: Jeremy Cline <jcline@redhat.com>
e336be
---
e336be
 arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi | 12 ------------
e336be
 1 file changed, 12 deletions(-)
e336be
e336be
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi
e336be
index f68254831ad9..90bfc6e7ce68 100644
e336be
--- a/arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi
e336be
+++ b/arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi
e336be
@@ -33,18 +33,6 @@
e336be
 		regulator-always-on;
e336be
 		vin-supply = <&vcc_sys>;
e336be
 	};
e336be
-
e336be
-	vdd_log: vdd-log {
e336be
-		compatible = "pwm-regulator";
e336be
-		pwms = <&pwm2 0 25000 0>;
e336be
-		regulator-name = "vdd_log";
e336be
-		regulator-min-microvolt = <800000>;
e336be
-		regulator-max-microvolt = <1400000>;
e336be
-		regulator-always-on;
e336be
-		regulator-boot-on;
e336be
-		vin-supply = <&vcc_sys>;
e336be
-	};
e336be
-
e336be
 };
e336be
 
e336be
 &cpu_l0 {
e336be
-- 
e336be
2.19.2
e336be