From 077a63db1dfc7fce80b20a5c62c869f1f9c04e22 Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Wed, 19 Dec 2018 13:57:19 +0100 Subject: [PATCH] ipq40xx: 4.19: Enable pseudo random number generator IPQ40xx series has a HW pseudo random number generator built in. It already has a node in the upstream ipq4019.dtsi so we just need to enable it. Its driver has been rewritten to use crypto API so we dont have char interface like under 4.14 kernel. Signed-off-by: Robert Marko --- target/linux/ipq40xx/config-4.19 | 2 +- .../ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4018-a42.dts | 4 ++++ .../files-4.19/arch/arm/boot/dts/qcom-ipq4018-eap1300.dts | 4 ++++ .../files-4.19/arch/arm/boot/dts/qcom-ipq4018-ex61x0v2.dtsi | 4 ++++ .../files-4.19/arch/arm/boot/dts/qcom-ipq4018-fritz4040.dts | 4 ++++ .../files-4.19/arch/arm/boot/dts/qcom-ipq4018-jalapeno.dts | 4 ++++ .../files-4.19/arch/arm/boot/dts/qcom-ipq4018-nbg6617.dts | 4 ++++ .../files-4.19/arch/arm/boot/dts/qcom-ipq4018-rt-ac58u.dts | 4 ++++ .../files-4.19/arch/arm/boot/dts/qcom-ipq4018-wre6606.dts | 4 ++++ .../ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4019-a62.dts | 4 ++++ .../files-4.19/arch/arm/boot/dts/qcom-ipq4019-ap.dk04.1.dtsi | 4 ++++ .../files-4.19/arch/arm/boot/dts/qcom-ipq4028-wpj428.dts | 4 ++++ .../files-4.19/arch/arm/boot/dts/qcom-ipq4029-gl-b1300.dts | 4 ++++ .../files-4.19/arch/arm/boot/dts/qcom-ipq4029-mr33.dts | 4 ++++ 14 files changed, 53 insertions(+), 1 deletion(-) diff --git a/target/linux/ipq40xx/config-4.19 b/target/linux/ipq40xx/config-4.19 index fcbbabf43af..aec99641c18 100644 --- a/target/linux/ipq40xx/config-4.19 +++ b/target/linux/ipq40xx/config-4.19 @@ -123,7 +123,7 @@ CONFIG_CRYPTO_CTR=y CONFIG_CRYPTO_DEFLATE=y CONFIG_CRYPTO_DES=y CONFIG_CRYPTO_DEV_QCE=y -# CONFIG_CRYPTO_DEV_QCOM_RNG is not set +CONFIG_CRYPTO_DEV_QCOM_RNG=y CONFIG_CRYPTO_DRBG=y CONFIG_CRYPTO_DRBG_HMAC=y CONFIG_CRYPTO_DRBG_MENU=y diff --git a/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4018-a42.dts b/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4018-a42.dts index ed81cbc9b5e..6bc178ccfa2 100644 --- a/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4018-a42.dts +++ b/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4018-a42.dts @@ -25,6 +25,10 @@ compatible = "openmesh,a42", "qcom,ipq4019"; soc { + rng@22000 { + status = "okay"; + }; + mdio@90000 { status = "okay"; }; diff --git a/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4018-eap1300.dts b/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4018-eap1300.dts index a86e34229e6..7a401038739 100644 --- a/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4018-eap1300.dts +++ b/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4018-eap1300.dts @@ -10,6 +10,10 @@ compatible = "engenius,eap1300", "qcom,ipq4019"; soc { + rng@22000 { + status = "okay"; + }; + mdio@90000 { status = "okay"; }; diff --git a/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4018-ex61x0v2.dtsi b/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4018-ex61x0v2.dtsi index ceece0f9568..bb6cf4ee024 100644 --- a/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4018-ex61x0v2.dtsi +++ b/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4018-ex61x0v2.dtsi @@ -25,6 +25,10 @@ compatible = "netgear,ex61x0v2", "qcom,ipq4019"; soc { + rng@22000 { + status = "okay"; + }; + mdio@90000 { status = "okay"; }; diff --git a/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4018-fritz4040.dts b/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4018-fritz4040.dts index ea7499da4c8..976e7498edc 100644 --- a/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4018-fritz4040.dts +++ b/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4018-fritz4040.dts @@ -17,6 +17,10 @@ }; soc { + rng@22000 { + status = "okay"; + }; + mdio@90000 { status = "okay"; }; diff --git a/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4018-jalapeno.dts b/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4018-jalapeno.dts index 0c27e1757d5..003b4764a83 100644 --- a/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4018-jalapeno.dts +++ b/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4018-jalapeno.dts @@ -25,6 +25,10 @@ compatible = "8dev,jalapeno", "qcom,ipq4019"; soc { + rng@22000 { + status = "okay"; + }; + mdio@90000 { status = "okay"; pinctrl-0 = <&mdio_pins>; diff --git a/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4018-nbg6617.dts b/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4018-nbg6617.dts index cb0791a3998..4083100beb2 100644 --- a/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4018-nbg6617.dts +++ b/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4018-nbg6617.dts @@ -27,6 +27,10 @@ }; soc { + rng@22000 { + status = "okay"; + }; + mdio@90000 { status = "okay"; }; diff --git a/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4018-rt-ac58u.dts b/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4018-rt-ac58u.dts index 8c32b9eb36e..783061a2e84 100644 --- a/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4018-rt-ac58u.dts +++ b/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4018-rt-ac58u.dts @@ -26,6 +26,10 @@ }; soc { + rng@22000 { + status = "okay"; + }; + mdio@90000 { status = "okay"; }; diff --git a/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4018-wre6606.dts b/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4018-wre6606.dts index 2809a67693b..62d4218ea60 100644 --- a/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4018-wre6606.dts +++ b/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4018-wre6606.dts @@ -36,6 +36,10 @@ }; soc { + rng@22000 { + status = "okay"; + }; + mdio@90000 { status = "okay"; }; diff --git a/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4019-a62.dts b/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4019-a62.dts index 24cfc30fdfe..71c822feb2f 100644 --- a/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4019-a62.dts +++ b/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4019-a62.dts @@ -25,6 +25,10 @@ compatible = "openmesh,a62", "qcom,ipq4019"; soc { + rng@22000 { + status = "okay"; + }; + mdio@90000 { status = "okay"; }; diff --git a/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4019-ap.dk04.1.dtsi b/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4019-ap.dk04.1.dtsi index 157037f5584..9801354625f 100644 --- a/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4019-ap.dk04.1.dtsi +++ b/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4019-ap.dk04.1.dtsi @@ -22,6 +22,10 @@ compatible = "qcom,ipq4019"; soc { + rng@22000 { + status = "okay"; + }; + pinctrl@1000000 { serial_0_pins: serial_pinmux { mux { diff --git a/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4028-wpj428.dts b/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4028-wpj428.dts index 151f5e00c00..778fad3e3b2 100644 --- a/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4028-wpj428.dts +++ b/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4028-wpj428.dts @@ -26,6 +26,10 @@ compatible = "compex,wpj428", "qcom,ipq4019"; soc { + rng@22000 { + status = "okay"; + }; + mdio@90000 { status = "okay"; }; diff --git a/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4029-gl-b1300.dts b/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4029-gl-b1300.dts index 355299612f9..816f033d430 100644 --- a/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4029-gl-b1300.dts +++ b/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4029-gl-b1300.dts @@ -36,6 +36,10 @@ }; soc { + rng@22000 { + status = "okay"; + }; + mdio@90000 { status = "okay"; }; diff --git a/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4029-mr33.dts b/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4029-mr33.dts index 5073fe9cb8d..8dcde3bdb94 100644 --- a/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4029-mr33.dts +++ b/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4029-mr33.dts @@ -35,6 +35,10 @@ }; soc { + rng@22000 { + status = "okay"; + }; + mdio@90000 { status = "okay"; pinctrl-0 = <&mdio_pins>; -- 2.30.2