rockchip: enable hwRNG support at SoC level

RK3328 is skipped due to hardware bugs.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit ffd4b3c3ae)
This commit is contained in:
Tianling Shen
2024-02-27 20:36:35 +08:00
parent e9cf40956b
commit f5721cfeb2
4 changed files with 7 additions and 65 deletions

View File

@@ -403,10 +403,6 @@
status = "okay";
};
&rng {
status = "okay";
};
&saradc {
vref-supply = <&vcca_1v8>;
status = "okay";

View File

@@ -13,7 +13,7 @@ Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
--- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
@@ -1939,6 +1939,16 @@
@@ -1939,6 +1939,15 @@
};
};
@@ -24,7 +24,6 @@ Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
+ clock-names = "clk_crypto", "hclk_crypto";
+ assigned-clocks = <&cru SCLK_CRYPTO1>, <&cru HCLK_S_CRYPTO1>;
+ assigned-clock-rates = <150000000>, <100000000>;
+ status = "disabled";
+ };
+
gpu: gpu@ff9a0000 {

View File

@@ -9,10 +9,10 @@ Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
arch/arm64/boot/dts/rockchip/rk3568.dtsi | 10 ++++++++++
1 file changed, 10 insertions(+)
--- a/arch/arm64/boot/dts/rockchip/rk3568.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3568.dtsi
@@ -213,6 +213,16 @@
};
--- a/arch/arm64/boot/dts/rockchip/rk356x.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk356x.dtsi
@@ -1570,6 +1570,15 @@
status = "disabled";
};
+ rng: rng@fe388000 {
@@ -22,9 +22,8 @@ Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
+ clock-names = "clk_trng", "hclk_trng";
+ resets = <&cru SRST_TRNG_NS>;
+ reset-names = "reset";
+ status = "disabled";
+ };
+
combphy0: phy@fe820000 {
combphy1: phy@fe830000 {
compatible = "rockchip,rk3568-naneng-combphy";
reg = <0x0 0xfe820000 0x0 0x100>;
reg = <0x0 0xfe830000 0x0 0x100>;

View File

@@ -1,52 +0,0 @@
--- a/arch/arm64/boot/dts/rockchip/rk3399-nanopi4.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399-nanopi4.dtsi
@@ -608,6 +608,10 @@
status = "okay";
};
+&rng {
+ status = "okay";
+};
+
&saradc {
vref-supply = <&vcca1v8_s3>;
status = "okay";
--- a/arch/arm64/boot/dts/rockchip/rk3568-fastrhino-r66s.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3568-fastrhino-r66s.dtsi
@@ -423,6 +423,10 @@
status = "okay";
};
+&rng {
+ status = "okay";
+};
+
&saradc {
vref-supply = <&vcca_1v8>;
status = "okay";
--- a/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dtsi
@@ -486,6 +486,10 @@
status = "okay";
};
+&rng {
+ status = "okay";
+};
+
&saradc {
vref-supply = <&vcca_1v8>;
status = "okay";
--- a/arch/arm64/boot/dts/rockchip/rk3568-roc-pc.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3568-roc-pc.dts
@@ -546,6 +546,10 @@
status = "okay";
};
+&rng {
+ status = "okay";
+};
+
&saradc {
vref-supply = <&vcca_1v8>;
status = "okay";