From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Yuntian Zhang <yt@radxa.com>
Date: Tue, 26 Apr 2022 14:16:32 +0800
Subject: [PATCH] rockchip: move crypto functions to rk3588s

rkbin uses crypto device to verify hash before passing control to bootloader. If this device is missing boot will fail.

Signed-off-by: Yuntian Zhang <yt@radxa.com>
---
 arch/arm/dts/rk3588.dtsi  | 15 ---------------
 arch/arm/dts/rk3588s.dtsi | 15 +++++++++++++++
 2 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/arch/arm/dts/rk3588.dtsi b/arch/arm/dts/rk3588.dtsi
index 8a13e8edd8..f7eb5936a8 100644
--- a/arch/arm/dts/rk3588.dtsi
+++ b/arch/arm/dts/rk3588.dtsi
@@ -429,21 +429,6 @@
 		status = "disabled";
 	};
 
-	crypto: crypto@fe370000 {
-		compatible = "rockchip,rk3588-crypto";
-		reg = <0x0 0xfe370000 0x0 0x4000>;
-		clocks = <&scmi_clk SCMI_CRYPTO_CORE>, <&scmi_clk SCMI_CRYPTO_PKA>;
-		clock-names = "sclk_crypto", "apkclk_crypto";
-		clock-frequency = <350000000>, <350000000>;
-		status = "disabled";
-	};
-
-	rng: rng@fe378000 {
-		compatible = "rockchip,trngv1";
-		reg = <0x0 0xfe378000 0x0 0x200>;
-		status = "disabled";
-	};
-
 	hdptxphy1: phy@fed70000 {
 		compatible = "rockchip,rk3588-hdptx-phy";
 		reg = <0x0 0xfed70000 0x0 0x2000>;
diff --git a/arch/arm/dts/rk3588s.dtsi b/arch/arm/dts/rk3588s.dtsi
index 53ccfbaeed..ca18d3bd0c 100644
--- a/arch/arm/dts/rk3588s.dtsi
+++ b/arch/arm/dts/rk3588s.dtsi
@@ -2220,6 +2220,21 @@
 		arm,pl330-periph-burst;
 	};
 
+	crypto: crypto@fe370000 {
+		compatible = "rockchip,rk3588-crypto";
+		reg = <0x0 0xfe370000 0x0 0x4000>;
+		clocks = <&scmi_clk SCMI_CRYPTO_CORE>, <&scmi_clk SCMI_CRYPTO_PKA>;
+		clock-names = "sclk_crypto", "apkclk_crypto";
+		clock-frequency = <350000000>, <350000000>;
+		status = "disabled";
+	};
+
+	rng: rng@fe378000 {
+		compatible = "rockchip,trngv1";
+		reg = <0x0 0xfe378000 0x0 0x200>;
+		status = "disabled";
+	};
+
 	hdptxphy0: phy@fed60000 {
 		compatible = "rockchip,rk3588-hdptx-phy";
 		reg = <0x0 0xfed60000 0x0 0x2000>;
-- 
2.36.1

