linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] hw_random: bcm2835: Add support for Broadcom BCM5301x
@ 2016-06-23  0:27 Florian Fainelli
  2016-06-23  0:27 ` [PATCH 1/3] Documentation: devicetree: bindings: Add BCM5301x binding Florian Fainelli
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Florian Fainelli @ 2016-06-23  0:27 UTC (permalink / raw)
  To: linux-arm-kernel

Hi all,

This patch series adds support for the Broadcom BCM5301x SoCs random number
generator which is the same block as the one found in NSP and BCM2835.

Florian Fainelli (3):
  Documentation: devicetree: bindings: Add BCM5301x binding
  hw_random: bcm2835: Add support for Broadcom BCM5301x
  ARM: dts: BCM5301x: Add RNG Device Tree node

 Documentation/devicetree/bindings/rng/brcm,bcm2835.txt | 3 ++-
 arch/arm/boot/dts/bcm5301x.dtsi                        | 5 +++++
 drivers/char/hw_random/Kconfig                         | 2 +-
 drivers/char/hw_random/bcm2835-rng.c                   | 1 +
 4 files changed, 9 insertions(+), 2 deletions(-)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/3] Documentation: devicetree: bindings: Add BCM5301x binding
  2016-06-23  0:27 [PATCH 0/3] hw_random: bcm2835: Add support for Broadcom BCM5301x Florian Fainelli
@ 2016-06-23  0:27 ` Florian Fainelli
  2016-06-27  9:04   ` Herbert Xu
  2016-06-23  0:27 ` [PATCH 2/3] hw_random: bcm2835: Add support for Broadcom BCM5301x Florian Fainelli
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 9+ messages in thread
From: Florian Fainelli @ 2016-06-23  0:27 UTC (permalink / raw)
  To: linux-arm-kernel

Document the binding used by the Broadcom BCM5301x (Northstar) SoC
random number generator.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 Documentation/devicetree/bindings/rng/brcm,bcm2835.txt | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/rng/brcm,bcm2835.txt b/Documentation/devicetree/bindings/rng/brcm,bcm2835.txt
index aa304d412058..26542690b578 100644
--- a/Documentation/devicetree/bindings/rng/brcm,bcm2835.txt
+++ b/Documentation/devicetree/bindings/rng/brcm,bcm2835.txt
@@ -2,7 +2,8 @@ BCM2835 Random number generator
 
 Required properties:
 
-- compatible : should be "brcm,bcm2835-rng"  or "brcm,bcm-nsp-rng"
+- compatible : should be "brcm,bcm2835-rng"  or "brcm,bcm-nsp-rng" or
+  "brcm,bcm5301x-rng"
 - reg : Specifies base physical address and size of the registers.
 
 Example:
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/3] hw_random: bcm2835: Add support for Broadcom BCM5301x
  2016-06-23  0:27 [PATCH 0/3] hw_random: bcm2835: Add support for Broadcom BCM5301x Florian Fainelli
  2016-06-23  0:27 ` [PATCH 1/3] Documentation: devicetree: bindings: Add BCM5301x binding Florian Fainelli
@ 2016-06-23  0:27 ` Florian Fainelli
  2016-06-24 13:31   ` Herbert Xu
  2016-06-23  0:27 ` [PATCH 3/3] ARM: dts: BCM5301x: Add RNG Device Tree node Florian Fainelli
  2016-06-23  0:55 ` [PATCH 0/3] hw_random: bcm2835: Add support for Broadcom BCM5301x Scott Branden
  3 siblings, 1 reply; 9+ messages in thread
From: Florian Fainelli @ 2016-06-23  0:27 UTC (permalink / raw)
  To: linux-arm-kernel

The Broadcom BCM5301x SoCs (Northstar) utilize the same random number
generator peripheral as Northstar Plus and BCM2835, but just like the
NSP SoC, we need to enable the interrupt.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 drivers/char/hw_random/Kconfig       | 2 +-
 drivers/char/hw_random/bcm2835-rng.c | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/char/hw_random/Kconfig b/drivers/char/hw_random/Kconfig
index 51401100466b..56ad5a5936a9 100644
--- a/drivers/char/hw_random/Kconfig
+++ b/drivers/char/hw_random/Kconfig
@@ -90,7 +90,7 @@ config HW_RANDOM_BCM63XX
 
 config HW_RANDOM_BCM2835
 	tristate "Broadcom BCM2835 Random Number Generator support"
-	depends on ARCH_BCM2835 || ARCH_BCM_NSP
+	depends on ARCH_BCM2835 || ARCH_BCM_NSP || ARCH_BCM_5301X
 	default HW_RANDOM
 	---help---
 	  This driver provides kernel-side support for the Random Number
diff --git a/drivers/char/hw_random/bcm2835-rng.c b/drivers/char/hw_random/bcm2835-rng.c
index 75ca820730be..af2149273fe0 100644
--- a/drivers/char/hw_random/bcm2835-rng.c
+++ b/drivers/char/hw_random/bcm2835-rng.c
@@ -70,6 +70,7 @@ static struct hwrng bcm2835_rng_ops = {
 static const struct of_device_id bcm2835_rng_of_match[] = {
 	{ .compatible = "brcm,bcm2835-rng"},
 	{ .compatible = "brcm,bcm-nsp-rng", .data = nsp_rng_init},
+	{ .compatible = "brcm,bcm5301x-rng", .data = nsp_rng_init},
 	{},
 };
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 3/3] ARM: dts: BCM5301x: Add RNG Device Tree node
  2016-06-23  0:27 [PATCH 0/3] hw_random: bcm2835: Add support for Broadcom BCM5301x Florian Fainelli
  2016-06-23  0:27 ` [PATCH 1/3] Documentation: devicetree: bindings: Add BCM5301x binding Florian Fainelli
  2016-06-23  0:27 ` [PATCH 2/3] hw_random: bcm2835: Add support for Broadcom BCM5301x Florian Fainelli
@ 2016-06-23  0:27 ` Florian Fainelli
  2016-06-27 18:21   ` Florian Fainelli
  2016-06-23  0:55 ` [PATCH 0/3] hw_random: bcm2835: Add support for Broadcom BCM5301x Scott Branden
  3 siblings, 1 reply; 9+ messages in thread
From: Florian Fainelli @ 2016-06-23  0:27 UTC (permalink / raw)
  To: linux-arm-kernel

Add the DT node for the random number generator peripheral.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 arch/arm/boot/dts/bcm5301x.dtsi | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/boot/dts/bcm5301x.dtsi b/arch/arm/boot/dts/bcm5301x.dtsi
index 7d4d29bf0ed3..c67e451435f4 100644
--- a/arch/arm/boot/dts/bcm5301x.dtsi
+++ b/arch/arm/boot/dts/bcm5301x.dtsi
@@ -260,6 +260,11 @@
 				     "sata2";
 	};
 
+	rng: rng at 18004000 {
+		compatible = "brcm,bcm5301x-rng";
+		reg = <0x18004000 0x14>;
+	};
+
 	nand: nand at 18028000 {
 		compatible = "brcm,nand-iproc", "brcm,brcmnand-v6.1", "brcm,brcmnand";
 		reg = <0x18028000 0x600>, <0x1811a408 0x600>, <0x18028f00 0x20>;
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 0/3] hw_random: bcm2835: Add support for Broadcom BCM5301x
  2016-06-23  0:27 [PATCH 0/3] hw_random: bcm2835: Add support for Broadcom BCM5301x Florian Fainelli
                   ` (2 preceding siblings ...)
  2016-06-23  0:27 ` [PATCH 3/3] ARM: dts: BCM5301x: Add RNG Device Tree node Florian Fainelli
@ 2016-06-23  0:55 ` Scott Branden
  3 siblings, 0 replies; 9+ messages in thread
From: Scott Branden @ 2016-06-23  0:55 UTC (permalink / raw)
  To: linux-arm-kernel

Patch series looks good.

Acked-by: Scott Branden <scott.branden@broadcom.com>

On 16-06-22 05:27 PM, Florian Fainelli wrote:
> Hi all,
>
> This patch series adds support for the Broadcom BCM5301x SoCs random number
> generator which is the same block as the one found in NSP and BCM2835.
>
> Florian Fainelli (3):
>    Documentation: devicetree: bindings: Add BCM5301x binding
>    hw_random: bcm2835: Add support for Broadcom BCM5301x
>    ARM: dts: BCM5301x: Add RNG Device Tree node
>
>   Documentation/devicetree/bindings/rng/brcm,bcm2835.txt | 3 ++-
>   arch/arm/boot/dts/bcm5301x.dtsi                        | 5 +++++
>   drivers/char/hw_random/Kconfig                         | 2 +-
>   drivers/char/hw_random/bcm2835-rng.c                   | 1 +
>   4 files changed, 9 insertions(+), 2 deletions(-)
>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 2/3] hw_random: bcm2835: Add support for Broadcom BCM5301x
  2016-06-23  0:27 ` [PATCH 2/3] hw_random: bcm2835: Add support for Broadcom BCM5301x Florian Fainelli
@ 2016-06-24 13:31   ` Herbert Xu
  2016-06-24 17:30     ` Florian Fainelli
  0 siblings, 1 reply; 9+ messages in thread
From: Herbert Xu @ 2016-06-24 13:31 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jun 22, 2016 at 05:27:02PM -0700, Florian Fainelli wrote:
> The Broadcom BCM5301x SoCs (Northstar) utilize the same random number
> generator peripheral as Northstar Plus and BCM2835, but just like the
> NSP SoC, we need to enable the interrupt.
> 
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>

Patch applied.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 2/3] hw_random: bcm2835: Add support for Broadcom BCM5301x
  2016-06-24 13:31   ` Herbert Xu
@ 2016-06-24 17:30     ` Florian Fainelli
  0 siblings, 0 replies; 9+ messages in thread
From: Florian Fainelli @ 2016-06-24 17:30 UTC (permalink / raw)
  To: linux-arm-kernel

On 06/24/2016 06:31 AM, Herbert Xu wrote:
> On Wed, Jun 22, 2016 at 05:27:02PM -0700, Florian Fainelli wrote:
>> The Broadcom BCM5301x SoCs (Northstar) utilize the same random number
>> generator peripheral as Northstar Plus and BCM2835, but just like the
>> NSP SoC, we need to enable the interrupt.
>>
>> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
> 
> Patch applied.
> 

Thanks! Do you mind taking patch 1 as well? I will take patch 3 via my
arm-soc tree.
-- 
Florian

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/3] Documentation: devicetree: bindings: Add BCM5301x binding
  2016-06-23  0:27 ` [PATCH 1/3] Documentation: devicetree: bindings: Add BCM5301x binding Florian Fainelli
@ 2016-06-27  9:04   ` Herbert Xu
  0 siblings, 0 replies; 9+ messages in thread
From: Herbert Xu @ 2016-06-27  9:04 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jun 22, 2016 at 05:27:01PM -0700, Florian Fainelli wrote:
> Document the binding used by the Broadcom BCM5301x (Northstar) SoC
> random number generator.
> 
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>

Patch applied.  Thanks.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 3/3] ARM: dts: BCM5301x: Add RNG Device Tree node
  2016-06-23  0:27 ` [PATCH 3/3] ARM: dts: BCM5301x: Add RNG Device Tree node Florian Fainelli
@ 2016-06-27 18:21   ` Florian Fainelli
  0 siblings, 0 replies; 9+ messages in thread
From: Florian Fainelli @ 2016-06-27 18:21 UTC (permalink / raw)
  To: linux-arm-kernel

On 06/22/2016 05:27 PM, Florian Fainelli wrote:
> Add the DT node for the random number generator peripheral.
> 
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>

Applied
-- 
Florian

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2016-06-27 18:21 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-23  0:27 [PATCH 0/3] hw_random: bcm2835: Add support for Broadcom BCM5301x Florian Fainelli
2016-06-23  0:27 ` [PATCH 1/3] Documentation: devicetree: bindings: Add BCM5301x binding Florian Fainelli
2016-06-27  9:04   ` Herbert Xu
2016-06-23  0:27 ` [PATCH 2/3] hw_random: bcm2835: Add support for Broadcom BCM5301x Florian Fainelli
2016-06-24 13:31   ` Herbert Xu
2016-06-24 17:30     ` Florian Fainelli
2016-06-23  0:27 ` [PATCH 3/3] ARM: dts: BCM5301x: Add RNG Device Tree node Florian Fainelli
2016-06-27 18:21   ` Florian Fainelli
2016-06-23  0:55 ` [PATCH 0/3] hw_random: bcm2835: Add support for Broadcom BCM5301x Scott Branden

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).