ARM: dts: aspeed: Describe random number device
authorJoel Stanley <joel@jms.id.au>
Thu, 22 Mar 2018 05:37:35 +0000 (16:07 +1030)
committerJoel Stanley <joel@jms.id.au>
Mon, 30 Apr 2018 04:51:29 +0000 (14:21 +0930)
There is a random number generator that updates a register in the SCU
every second. This is compatible with the timeriomem rng driver in the
kernel.

From the timeriomem_rng bindings:

  quality: estimated number of bits of true entropy per 1024 bits read
  from the rng.  Defaults to zero which causes the kernel's default
  quality to be used instead.  Note that the default quality is usually
  zero which disables using this rng to automatically fill the kernel's
  entropy pool.

As to the recommended value for us to use:

 Rick Altherr <raltherr@google.com> wrote:
 > Quality is #bit of entropy per 1000 bits read.  100 is a
 > conservative value that was suggested by those in the know.

Signed-off-by: Joel Stanley <joel@jms.id.au>
arch/arm/boot/dts/aspeed-g4.dtsi
arch/arm/boot/dts/aspeed-g5.dtsi

index 518d2bc7c7fca3e2ba1363c835c561c8e81c6cb4..8d7303ad52735e8cb1bf405f192f3b45ba807f40 100644 (file)
                                pinctrl: pinctrl {
                                        compatible = "aspeed,g4-pinctrl";
                                };
+
+                       };
+
+                       rng: hwrng@78 {
+                               compatible = "timeriomem_rng";
+                               reg = <0x78 0x4>;
+                               period = <1>;
+                               quality = <100>;
                        };
 
                        adc: adc@1e6e9000 {
index f9917717dd088faa33227177ceca19d822ae632f..c4a20d590e47de05a4805724bc0a7778a79e97b6 100644 (file)
                                };
                        };
 
+                       rng: hwrng@78 {
+                               compatible = "timeriomem_rng";
+                               reg = <0x78 0x4>;
+                               period = <1>;
+                               quality = <100>;
+                       };
+
                        gfx: display@1e6e6000 {
                                compatible = "aspeed,ast2500-gfx", "syscon";
                                reg = <0x1e6e6000 0x1000>;