From ac06b33cc8bcaade758a2b0d5b7c90b61c8ad084 Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megi@xff.cz>
Date: Tue, 18 Jul 2023 13:47:19 +0200
Subject: [PATCH 247/463] arm64: dts: rk3399-rockpro64: Add DMC nodes

Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
 .../boot/dts/rockchip/rk3399-rockpro64.dtsi   | 33 +++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi
index f30b82a10ca38..7a864b84b6b29 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi
@@ -292,6 +292,39 @@ map3 {
 	};
 };
 
+&dfi {
+	status = "okay";
+};
+
+&dmc {
+	// This node can only be enabled by FDT patching from U-Boot that
+	// uses Rockchip TPL/TF-A. DMC only works with the downstream firmware.
+	// If you enabled this on mainline, your phone will lock up on boot.
+	//status = "okay";
+
+	center-supply = <&vdd_center>;
+
+	rockchip,pd-idle-ns = <160>;
+	rockchip,sr-idle-ns = <10240>;
+	rockchip,sr-mc-gate-idle-ns = <40960>;
+	rockchip,srpd-lite-idle-ns = <61440>;
+	rockchip,standby-idle-ns = <81920>;
+
+	rockchip,lpddr4_odt_dis_freq = <666000000>;
+
+	rockchip,srpd-lite-idle-dis-freq-hz = <0>;
+	rockchip,standby-idle-dis-freq-hz = <928000000>;
+	rockchip,sr-mc-gate-idle-dis-freq-hz = <800000000>;
+	rockchip,pd-idle-dis-freq-hz = <800000000>;
+	rockchip,sr-idle-dis-freq-hz = <800000000>;
+};
+
+&dmc_opp_table {
+	opp00 {
+		opp-suspend;
+	};
+};
+
 &emmc_phy {
 	status = "okay";
 };
-- 
2.46.0

