From 2b575a746535f922cdd9760212b246f4eafdf9e2 Mon Sep 17 00:00:00 2001 From: Zhen Kong Date: Fri, 13 Dec 2019 11:32:50 -0800 Subject: [PATCH 1/2] dt-bindings: rng: Add DT binding entry for msm-rng Add DT binding entry for the rng driver for lahaina. Change-Id: I78ac1cb3f94d9ca0b0e677d5793a475eaf25d629 --- bindings/prng/msm-rng.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 bindings/prng/msm-rng.txt diff --git a/bindings/prng/msm-rng.txt b/bindings/prng/msm-rng.txt new file mode 100644 index 000000000000..917c2fb58a3f --- /dev/null +++ b/bindings/prng/msm-rng.txt @@ -0,0 +1,18 @@ +* RNG (Random Number Generator) + +Required properties: +- compatible : Should be "qcom,msm-rng" +- reg : Offset and length of the register set for the device + +Optional property: +- qcom,msm-rng-iface-clk : If the device uses iface-clk. +- qcom,no-qrng-config : Flag to decide whether the driver do the hardware configuration or not. + +Example: + + qcom,msm-rng@f9bff000 { + compatible = "qcom,msm-rng"; + reg = <0xf9bff000 0x200>; + qcom,msm-rng-iface-clk; + qcom,no-qrng-config; + }; From 0de1168e5b30601aeaabe38223a7dd50b7d3eaf3 Mon Sep 17 00:00:00 2001 From: Zhen Kong Date: Fri, 13 Dec 2019 11:28:01 -0800 Subject: [PATCH 2/2] ARM: dts: msm: Enable QRNG driver for lahaina Enable QRNG device node on include file to enable the QRNG driver to communicate with /dev/random on lahaina. Change-Id: I1f9da012f307610720c6c23c393cc59b866298ac --- qcom/lahaina.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/qcom/lahaina.dtsi b/qcom/lahaina.dtsi index fee851b93239..dcba0fde57bc 100644 --- a/qcom/lahaina.dtsi +++ b/qcom/lahaina.dtsi @@ -2332,6 +2332,16 @@ clock-names = "eud_ahb2phy_clk"; status = "ok"; }; + + qcom_rng: qrng@10d3000 { + compatible = "qcom,msm-rng"; + reg = <0x10d3000 0x1000>; + qcom,no-qrng-config; + interconnect-names = "data_path"; + interconnects = <&gem_noc MASTER_APPSS_PROC &config_noc SLAVE_HWKM>; + clock-names = "km_clk_src"; + clocks = <&clock_rpmh RPMH_HWKM_CLK>; + }; }; #include "lahaina-regulators.dtsi"