mirror of https://lore.kernel.org/linux-amlogic/
 help / color / mirror / Atom feed
From: martin.blumenstingl@googlemail.com (Martin Blumenstingl)
To: linus-amlogic@lists.infradead.org
Subject: [PATCH v2 07/10] ARM: dts: meson: add the hardware random number generator
Date: Thu, 15 Jun 2017 23:33:49 +0200	[thread overview]
Message-ID: <20170615213352.25134-8-martin.blumenstingl@googlemail.com> (raw)
In-Reply-To: <20170615213352.25134-1-martin.blumenstingl@googlemail.com>

All supported Meson SoCs have a random number generator in CBUS.
Newer SoCs (GXBB, GXL and GXM) provide only one 32-bit random number
register, whereas the older SoCs (Meson6, Meson8 and Meson8b) have two
32-bit random number registers. The existing meson-rng driver only
supports the lower 32-bit - but it still works fine on the older SoCs
apart from this small limitation.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
---
 arch/arm/boot/dts/meson.dtsi   | 5 +++++
 arch/arm/boot/dts/meson8.dtsi  | 6 ++++++
 arch/arm/boot/dts/meson8b.dtsi | 6 ++++++
 3 files changed, 17 insertions(+)

diff --git a/arch/arm/boot/dts/meson.dtsi b/arch/arm/boot/dts/meson.dtsi
index 46706d74a145..bf37606ba82e 100644
--- a/arch/arm/boot/dts/meson.dtsi
+++ b/arch/arm/boot/dts/meson.dtsi
@@ -80,6 +80,11 @@
 			#size-cells = <1>;
 			ranges = <0x0 0xc1100000 0x200000>;
 
+			hwrng: rng at 8100 {
+				compatible = "amlogic,meson-rng";
+				reg = <0x8100 0x8>;
+			};
+
 			uart_A: serial at 84c0 {
 				compatible = "amlogic,meson-uart";
 				reg = <0x84c0 0x18>;
diff --git a/arch/arm/boot/dts/meson8.dtsi b/arch/arm/boot/dts/meson8.dtsi
index df79a34a3530..b4c5fdd7b451 100644
--- a/arch/arm/boot/dts/meson8.dtsi
+++ b/arch/arm/boot/dts/meson8.dtsi
@@ -241,6 +241,12 @@
 	clock-names = "stmmaceth";
 };
 
+&hwrng {
+	compatible = "amlogic,meson8-rng", "amlogic,meson-rng";
+	clocks = <&clkc CLKID_RNG0>;
+	clock-names = "core";
+};
+
 &i2c_AO {
 	clocks = <&clkc CLKID_CLK81>;
 };
diff --git a/arch/arm/boot/dts/meson8b.dtsi b/arch/arm/boot/dts/meson8b.dtsi
index 1c09090ff4a5..a9d7074e6369 100644
--- a/arch/arm/boot/dts/meson8b.dtsi
+++ b/arch/arm/boot/dts/meson8b.dtsi
@@ -171,6 +171,12 @@
 	};
 };
 
+&hwrng {
+	compatible = "amlogic,meson8b-rng", "amlogic,meson-rng";
+	clocks = <&clkc CLKID_RNG0>;
+	clock-names = "core";
+};
+
 &L2 {
 	arm,data-latency = <3 3 3>;
 	arm,tag-latency = <2 2 2>;
-- 
2.13.1

  parent reply	other threads:[~2017-06-15 21:33 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-11 10:16 [PATCH 00/13] add support for more devices on Meson8 and Meson8b Martin Blumenstingl
2017-06-11 10:16 ` [PATCH 01/13] clk: meson8b: export the SAR ADC clocks Martin Blumenstingl
2017-06-12  7:28   ` Neil Armstrong
2017-06-11 10:16 ` [PATCH 02/13] clk: meson8b: export the SDIO clock Martin Blumenstingl
2017-06-12  7:28   ` Neil Armstrong
2017-06-11 10:16 ` [PATCH 03/13] clk: meson8b: export the gate clock for the HW random number generator Martin Blumenstingl
2017-06-12  7:28   ` Neil Armstrong
2017-06-11 10:16 ` [PATCH 04/13] clk: meson8b: export the USB clocks Martin Blumenstingl
2017-06-12  7:28   ` Neil Armstrong
2017-06-11 10:16 ` [PATCH 05/13] clk: meson8b: export the ethernet gate clock Martin Blumenstingl
2017-06-12  7:28   ` Neil Armstrong
2017-06-11 10:16 ` [PATCH 06/13] ARM: dts: meson8: add the PWM_E and PWM_F pins Martin Blumenstingl
2017-06-12  7:32   ` Neil Armstrong
2017-06-11 10:16 ` [PATCH 07/13] ARM: dts: meson8: add the pins for the SDIO controller Martin Blumenstingl
2017-06-12  7:32   ` Neil Armstrong
2017-06-11 10:16 ` [PATCH 08/13] ARM: dts: meson: add the SAR ADC Martin Blumenstingl
2017-06-12  7:33   ` Neil Armstrong
2017-06-11 10:16 ` [PATCH 09/13] ARM: dts: meson8: add reserved memory zones Martin Blumenstingl
2017-06-12  7:32   ` Neil Armstrong
2017-06-14 21:46     ` Martin Blumenstingl
2017-06-11 10:16 ` [PATCH 10/13] ARM: dts: meson: add the hardware random number generator Martin Blumenstingl
2017-06-12  7:35   ` Neil Armstrong
2017-06-11 10:16 ` [PATCH 11/13] ARM: dts: meson: add USB support on Meson8 and Meson8b Martin Blumenstingl
2017-06-12  7:36   ` Neil Armstrong
2017-06-11 10:16 ` [PATCH 12/13] ARM: dts: meson8b: add the SCU device node Martin Blumenstingl
2017-06-12  7:37   ` Neil Armstrong
2017-06-11 10:16 ` [PATCH 13/13] ARM: dts: meson: use the real ethernet clock on Meson8 and Meson8b Martin Blumenstingl
2017-06-12  7:37   ` Neil Armstrong
2017-06-12  7:32 ` [PATCH 00/13] add support for more devices " Jerome Brunet
2017-06-14 21:39   ` Martin Blumenstingl
2017-06-15 21:33 ` [PATCH v2 00/10] " Martin Blumenstingl
2017-06-15 21:33   ` [PATCH v2 01/10] ARM: dts: meson: use C preprocessor friendly include syntax Martin Blumenstingl
2017-06-15 21:33   ` [PATCH v2 02/10] ARM: dts: meson: use GIC_SPI and IRQ_TYPE_EDGE_RISING macros Martin Blumenstingl
2017-06-15 21:33   ` [PATCH v2 03/10] ARM: dts: meson8: add the PWM_E and PWM_F pins Martin Blumenstingl
2017-06-15 21:33   ` [PATCH v2 04/10] ARM: dts: meson8: add the pins for the SDIO controller Martin Blumenstingl
2017-06-15 21:33   ` [PATCH v2 05/10] ARM: dts: meson: add the SAR ADC Martin Blumenstingl
2017-06-15 21:33   ` [PATCH v2 06/10] ARM: dts: meson8: add reserved memory zones Martin Blumenstingl
2017-06-15 21:33   ` Martin Blumenstingl [this message]
2017-06-15 21:33   ` [PATCH v2 08/10] ARM: dts: meson: add USB support on Meson8 and Meson8b Martin Blumenstingl
2017-06-15 21:33   ` [PATCH v2 09/10] ARM: dts: meson8b: add the SCU device node Martin Blumenstingl
2017-06-15 21:33   ` [PATCH v2 10/10] ARM: dts: meson: use the real ethernet clock on Meson8 and Meson8b Martin Blumenstingl
2017-06-16 19:10   ` [PATCH v2 00/10] add support for more devices " Kevin Hilman
2017-06-16 19:12   ` Kevin Hilman
2017-06-16 23:00     ` Martin Blumenstingl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170615213352.25134-8-martin.blumenstingl@googlemail.com \
    --to=martin.blumenstingl@googlemail.com \
    --cc=linus-amlogic@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®