From 177d470754881e3cff95d90e6b6d79d96ae92ccd Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megous@megous.com>
Date: Sat, 28 Jul 2018 00:42:25 +0200
Subject: [PATCH 74/82] Allow to disable cluster2 on A83T permanently

Hotplug is broken for now. Therfore this.

Signed-off-by: Ondrej Jirman <megous@megous.com>
---
 arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts | 8 ++++++++
 arch/arm/boot/dts/sun8i-a83t.dtsi         | 4 ++++
 2 files changed, 12 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts b/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts
index 8bba9ccd2592..7a1b6154cda9 100644
--- a/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts
+++ b/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts
@@ -41,6 +41,8 @@
  *     OTHER DEALINGS IN THE SOFTWARE.
  */
 
+#define A83T_C1_DISABLE
+
 /dts-v1/;
 #include "sun8i-a83t.dtsi"
 
@@ -188,9 +190,11 @@
 	cpu-supply = <&reg_dcdc2>;
 };
 
+#ifndef A83T_C1_DISABLE
 &cpu100 {
 	cpu-supply = <&reg_dcdc3>;
 };
+#endif
 
 &cpu0_thermal {
 	trips {
@@ -214,6 +218,7 @@
 	};
 };
 
+#ifndef A83T_C1_DISABLE
 &cpu1_thermal {
 	trips {
 		cpu1_hot: cpu_hot {
@@ -235,6 +240,7 @@
 		};
 	};
 };
+#endif
 
 &csi0 {
 	status = "okay";
@@ -516,7 +522,9 @@
 &reg_dcdc3 {
 	regulator-min-microvolt = <700000>;
 	regulator-max-microvolt = <1100000>;
+#ifndef A83T_C1_DISABLE
 	regulator-always-on;
+#endif
 	regulator-name = "vdd-cpu-B";
 };
 
diff --git a/arch/arm/boot/dts/sun8i-a83t.dtsi b/arch/arm/boot/dts/sun8i-a83t.dtsi
index 7b87029904bc..0bc7482744d7 100644
--- a/arch/arm/boot/dts/sun8i-a83t.dtsi
+++ b/arch/arm/boot/dts/sun8i-a83t.dtsi
@@ -113,6 +113,7 @@
 			#cooling-cells = <2>;
 		};
 
+#ifndef A83T_C1_DISABLE
 		cpu100: cpu@100 {
 			clocks = <&ccu CLK_C1CPUX>;
 			clock-names = "cpu";
@@ -164,6 +165,7 @@
 			reg = <0x103>;
 			#cooling-cells = <2>;
 		};
+#endif
 	};
 
 	timer {
@@ -274,6 +276,7 @@
 		};
 	};
 
+#ifndef A83T_C1_DISABLE
 	cpu1_opp_table: opp_table1 {
 		compatible = "operating-points-v2";
 		opp-shared;
@@ -326,6 +329,7 @@
 			clock-latency-ns = <244144>; /* 8 32k periods */
 		};
 	};
+#endif
 
 	soc {
 		compatible = "simple-bus";
-- 
2.20.1

