All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] ARM: AM33xx: Add RNG module data
@ 2013-08-06  8:33 ` Lokesh Vutla
  0 siblings, 0 replies; 24+ messages in thread
From: Lokesh Vutla @ 2013-08-06  8:33 UTC (permalink / raw)
  To: linux-omap
  Cc: linux-arm-kernel, tony, paul, devicetree, rob, rnayak,
	benoit.cousson, lokeshvutla

This patch series adds HWMOD, CLOCK and DT data for
RNG module.

Lokesh Vutla (3):
  ARM: AM33XX: hwmod: Add rng module data
  ARM: AM33xx: Add rng clock data
  ARM: dts: AM33xx: Add RNG node

 .../devicetree/bindings/hwrng/omap_rng.txt         |   22 ++++++++++++
 arch/arm/boot/dts/am335x-bone.dts                  |    4 +++
 arch/arm/boot/dts/am335x-evm.dts                   |    4 +++
 arch/arm/boot/dts/am335x-evmsk.dts                 |    4 +++
 arch/arm/boot/dts/am33xx.dtsi                      |    8 +++++
 arch/arm/mach-omap2/cclock33xx_data.c              |    5 +++
 arch/arm/mach-omap2/omap_hwmod_33xx_data.c         |   35 ++++++++++++++++++++
 7 files changed, 82 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/hwrng/omap_rng.txt

-- 
1.7.9.5


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

* [PATCH 0/3] ARM: AM33xx: Add RNG module data
@ 2013-08-06  8:33 ` Lokesh Vutla
  0 siblings, 0 replies; 24+ messages in thread
From: Lokesh Vutla @ 2013-08-06  8:33 UTC (permalink / raw)
  To: linux-arm-kernel

This patch series adds HWMOD, CLOCK and DT data for
RNG module.

Lokesh Vutla (3):
  ARM: AM33XX: hwmod: Add rng module data
  ARM: AM33xx: Add rng clock data
  ARM: dts: AM33xx: Add RNG node

 .../devicetree/bindings/hwrng/omap_rng.txt         |   22 ++++++++++++
 arch/arm/boot/dts/am335x-bone.dts                  |    4 +++
 arch/arm/boot/dts/am335x-evm.dts                   |    4 +++
 arch/arm/boot/dts/am335x-evmsk.dts                 |    4 +++
 arch/arm/boot/dts/am33xx.dtsi                      |    8 +++++
 arch/arm/mach-omap2/cclock33xx_data.c              |    5 +++
 arch/arm/mach-omap2/omap_hwmod_33xx_data.c         |   35 ++++++++++++++++++++
 7 files changed, 82 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/hwrng/omap_rng.txt

-- 
1.7.9.5

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

* [PATCH 1/3] ARM: AM33xx: hwmod: Add RNG module data
  2013-08-06  8:33 ` Lokesh Vutla
@ 2013-08-06  8:33   ` Lokesh Vutla
  -1 siblings, 0 replies; 24+ messages in thread
From: Lokesh Vutla @ 2013-08-06  8:33 UTC (permalink / raw)
  To: linux-omap
  Cc: linux-arm-kernel, tony, paul, devicetree, rob, rnayak,
	benoit.cousson, lokeshvutla

Add RNG hwmod data for AM33xx SoC.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
---
 arch/arm/mach-omap2/omap_hwmod_33xx_data.c |   35 ++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
index 28bbd56..6ff70aa 100644
--- a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
@@ -2455,6 +2455,40 @@ static struct omap_hwmod_ocp_if am33xx_l3_main__aes0 = {
 	.user		= OCP_USER_MPU | OCP_USER_SDMA,
 };
 
+/* rng */
+static struct omap_hwmod_class_sysconfig am33xx_rng_sysc = {
+	.rev_offs	= 0x1fe0,
+	.sysc_offs	= 0x1fe4,
+	.sysc_flags	= SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE,
+	.idlemodes	= SIDLE_FORCE | SIDLE_NO | SIDLE_SMART,
+	.sysc_fields	= &omap_hwmod_sysc_type1,
+};
+
+static struct omap_hwmod_class am33xx_rng_hwmod_class = {
+	.name		= "rng",
+	.sysc		= &am33xx_rng_sysc,
+};
+
+static struct omap_hwmod am33xx_rng_hwmod = {
+	.name		= "rng",
+	.class		= &am33xx_rng_hwmod_class,
+	.clkdm_name	= "l4ls_clkdm",
+	.main_clk	= "rng_fck",
+	.prcm		= {
+		.omap4	= {
+			.clkctrl_offs	= AM33XX_CM_PER_RNG_CLKCTRL_OFFSET,
+			.modulemode	= MODULEMODE_SWCTRL,
+		},
+	},
+};
+
+struct omap_hwmod_ocp_if am33xx_l4_per__rng = {
+	.master		= &am33xx_l4_ls_hwmod,
+	.slave		= &am33xx_rng_hwmod,
+	.clk		= "rng_fck",
+	.user		= OCP_USER_MPU,
+};
+
 static struct omap_hwmod_ocp_if *am33xx_hwmod_ocp_ifs[] __initdata = {
 	&am33xx_l3_main__emif,
 	&am33xx_mpu__l3_main,
@@ -2533,6 +2567,7 @@ static struct omap_hwmod_ocp_if *am33xx_hwmod_ocp_ifs[] __initdata = {
 	&am33xx_cpgmac0__mdio,
 	&am33xx_l3_main__sha0,
 	&am33xx_l3_main__aes0,
+	&am33xx_l4_per__rng,
 	NULL,
 };
 
-- 
1.7.9.5


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

* [PATCH 1/3] ARM: AM33xx: hwmod: Add RNG module data
@ 2013-08-06  8:33   ` Lokesh Vutla
  0 siblings, 0 replies; 24+ messages in thread
From: Lokesh Vutla @ 2013-08-06  8:33 UTC (permalink / raw)
  To: linux-arm-kernel

Add RNG hwmod data for AM33xx SoC.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
---
 arch/arm/mach-omap2/omap_hwmod_33xx_data.c |   35 ++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
index 28bbd56..6ff70aa 100644
--- a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
@@ -2455,6 +2455,40 @@ static struct omap_hwmod_ocp_if am33xx_l3_main__aes0 = {
 	.user		= OCP_USER_MPU | OCP_USER_SDMA,
 };
 
+/* rng */
+static struct omap_hwmod_class_sysconfig am33xx_rng_sysc = {
+	.rev_offs	= 0x1fe0,
+	.sysc_offs	= 0x1fe4,
+	.sysc_flags	= SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE,
+	.idlemodes	= SIDLE_FORCE | SIDLE_NO | SIDLE_SMART,
+	.sysc_fields	= &omap_hwmod_sysc_type1,
+};
+
+static struct omap_hwmod_class am33xx_rng_hwmod_class = {
+	.name		= "rng",
+	.sysc		= &am33xx_rng_sysc,
+};
+
+static struct omap_hwmod am33xx_rng_hwmod = {
+	.name		= "rng",
+	.class		= &am33xx_rng_hwmod_class,
+	.clkdm_name	= "l4ls_clkdm",
+	.main_clk	= "rng_fck",
+	.prcm		= {
+		.omap4	= {
+			.clkctrl_offs	= AM33XX_CM_PER_RNG_CLKCTRL_OFFSET,
+			.modulemode	= MODULEMODE_SWCTRL,
+		},
+	},
+};
+
+struct omap_hwmod_ocp_if am33xx_l4_per__rng = {
+	.master		= &am33xx_l4_ls_hwmod,
+	.slave		= &am33xx_rng_hwmod,
+	.clk		= "rng_fck",
+	.user		= OCP_USER_MPU,
+};
+
 static struct omap_hwmod_ocp_if *am33xx_hwmod_ocp_ifs[] __initdata = {
 	&am33xx_l3_main__emif,
 	&am33xx_mpu__l3_main,
@@ -2533,6 +2567,7 @@ static struct omap_hwmod_ocp_if *am33xx_hwmod_ocp_ifs[] __initdata = {
 	&am33xx_cpgmac0__mdio,
 	&am33xx_l3_main__sha0,
 	&am33xx_l3_main__aes0,
+	&am33xx_l4_per__rng,
 	NULL,
 };
 
-- 
1.7.9.5

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

* [PATCH 2/3] ARM: AM33xx: clock: Add RNG clock data
  2013-08-06  8:33 ` Lokesh Vutla
@ 2013-08-06  8:33   ` Lokesh Vutla
  -1 siblings, 0 replies; 24+ messages in thread
From: Lokesh Vutla @ 2013-08-06  8:33 UTC (permalink / raw)
  To: linux-omap
  Cc: linux-arm-kernel, tony, paul, devicetree, rob, rnayak,
	benoit.cousson, lokeshvutla

Add clock data for RNG module on AM33xx SoC.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
---
 arch/arm/mach-omap2/cclock33xx_data.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/mach-omap2/cclock33xx_data.c b/arch/arm/mach-omap2/cclock33xx_data.c
index ba6534d..865d30e 100644
--- a/arch/arm/mach-omap2/cclock33xx_data.c
+++ b/arch/arm/mach-omap2/cclock33xx_data.c
@@ -421,6 +421,10 @@ static struct clk aes0_fck;
 DEFINE_STRUCT_CLK_HW_OMAP(aes0_fck, NULL);
 DEFINE_STRUCT_CLK(aes0_fck, dpll_core_ck_parents, clk_ops_null);
 
+static struct clk rng_fck;
+DEFINE_STRUCT_CLK_HW_OMAP(rng_fck, NULL);
+DEFINE_STRUCT_CLK(rng_fck, dpll_core_ck_parents, clk_ops_null);
+
 /*
  * Modules clock nodes
  *
@@ -966,6 +970,7 @@ static struct omap_clk am33xx_clks[] = {
 	CLK(NULL,	"smartreflex1_fck",	&smartreflex1_fck),
 	CLK(NULL,	"sha0_fck",		&sha0_fck),
 	CLK(NULL,	"aes0_fck",		&aes0_fck),
+	CLK(NULL,	"rng_fck",		&rng_fck),
 	CLK(NULL,	"timer1_fck",		&timer1_fck),
 	CLK(NULL,	"timer2_fck",		&timer2_fck),
 	CLK(NULL,	"timer3_fck",		&timer3_fck),
-- 
1.7.9.5


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

* [PATCH 2/3] ARM: AM33xx: clock: Add RNG clock data
@ 2013-08-06  8:33   ` Lokesh Vutla
  0 siblings, 0 replies; 24+ messages in thread
From: Lokesh Vutla @ 2013-08-06  8:33 UTC (permalink / raw)
  To: linux-arm-kernel

Add clock data for RNG module on AM33xx SoC.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
---
 arch/arm/mach-omap2/cclock33xx_data.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/mach-omap2/cclock33xx_data.c b/arch/arm/mach-omap2/cclock33xx_data.c
index ba6534d..865d30e 100644
--- a/arch/arm/mach-omap2/cclock33xx_data.c
+++ b/arch/arm/mach-omap2/cclock33xx_data.c
@@ -421,6 +421,10 @@ static struct clk aes0_fck;
 DEFINE_STRUCT_CLK_HW_OMAP(aes0_fck, NULL);
 DEFINE_STRUCT_CLK(aes0_fck, dpll_core_ck_parents, clk_ops_null);
 
+static struct clk rng_fck;
+DEFINE_STRUCT_CLK_HW_OMAP(rng_fck, NULL);
+DEFINE_STRUCT_CLK(rng_fck, dpll_core_ck_parents, clk_ops_null);
+
 /*
  * Modules clock nodes
  *
@@ -966,6 +970,7 @@ static struct omap_clk am33xx_clks[] = {
 	CLK(NULL,	"smartreflex1_fck",	&smartreflex1_fck),
 	CLK(NULL,	"sha0_fck",		&sha0_fck),
 	CLK(NULL,	"aes0_fck",		&aes0_fck),
+	CLK(NULL,	"rng_fck",		&rng_fck),
 	CLK(NULL,	"timer1_fck",		&timer1_fck),
 	CLK(NULL,	"timer2_fck",		&timer2_fck),
 	CLK(NULL,	"timer3_fck",		&timer3_fck),
-- 
1.7.9.5

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

* [PATCH 3/3] ARM: dts: AM33xx: Add RNG node
  2013-08-06  8:33 ` Lokesh Vutla
@ 2013-08-06  8:33   ` Lokesh Vutla
  -1 siblings, 0 replies; 24+ messages in thread
From: Lokesh Vutla @ 2013-08-06  8:33 UTC (permalink / raw)
  To: linux-omap
  Cc: linux-arm-kernel, tony, paul, devicetree, rob, rnayak,
	benoit.cousson, lokeshvutla

Add the generic AM33xx RNG module's device tree data and
enable it for the am335x-evm, am335x-evmsk, and am335x-bone
platforms.  Also add Documentation file describing the data
for the RNG module.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
---
 .../devicetree/bindings/hwrng/omap_rng.txt         |   22 ++++++++++++++++++++
 arch/arm/boot/dts/am335x-bone.dts                  |    4 ++++
 arch/arm/boot/dts/am335x-evm.dts                   |    4 ++++
 arch/arm/boot/dts/am335x-evmsk.dts                 |    4 ++++
 arch/arm/boot/dts/am33xx.dtsi                      |    8 +++++++
 5 files changed, 42 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/hwrng/omap_rng.txt

diff --git a/Documentation/devicetree/bindings/hwrng/omap_rng.txt b/Documentation/devicetree/bindings/hwrng/omap_rng.txt
new file mode 100644
index 0000000..6a62acd
--- /dev/null
+++ b/Documentation/devicetree/bindings/hwrng/omap_rng.txt
@@ -0,0 +1,22 @@
+OMAP SoC HWRNG Module
+
+Required properties:
+
+- compatible : Should contain entries for this and backward compatible
+  RNG versions:
+  - "ti,omap2-rng" for OMAP2.
+  - "ti,omap4-rng" for OMAP4, OMAP5 and AM33XX.
+  Note that these two versions are incompatible.
+- ti,hwmods: Name of the hwmod associated with the RNG module
+- reg : Offset and length of the register set for the module
+- interrupts : the interrupt number for the RNG module.
+		Only used for "ti,omap4-rng".
+
+Example:
+/* AM335x */
+rng: rng@48310000 {
+	compatible = "ti,omap4-rng";
+	ti,hwmods = "rng";
+	reg = <0x48310000 0x2000>;
+	interrupts = <111>;
+};
diff --git a/arch/arm/boot/dts/am335x-bone.dts b/arch/arm/boot/dts/am335x-bone.dts
index 444b4ed..46a3887 100644
--- a/arch/arm/boot/dts/am335x-bone.dts
+++ b/arch/arm/boot/dts/am335x-bone.dts
@@ -234,3 +234,7 @@
 	pinctrl-0 = <&davinci_mdio_default>;
 	pinctrl-1 = <&davinci_mdio_sleep>;
 };
+
+&rng {
+	status = "okay";
+};
diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts
index 3aee1a4..ebfbebe1 100644
--- a/arch/arm/boot/dts/am335x-evm.dts
+++ b/arch/arm/boot/dts/am335x-evm.dts
@@ -488,3 +488,7 @@
 		ti,adc-channels = <4 5 6 7>;
 	};
 };
+
+&rng {
+	status = "okay";
+};
diff --git a/arch/arm/boot/dts/am335x-evmsk.dts b/arch/arm/boot/dts/am335x-evmsk.dts
index 0c8ad17..6610a05 100644
--- a/arch/arm/boot/dts/am335x-evmsk.dts
+++ b/arch/arm/boot/dts/am335x-evmsk.dts
@@ -402,3 +402,7 @@
 	phy_id = <&davinci_mdio>, <1>;
 	phy-mode = "rgmii-txid";
 };
+
+&rng {
+	status = "okay";
+};
diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
index 38b446b..b1e6205 100644
--- a/arch/arm/boot/dts/am33xx.dtsi
+++ b/arch/arm/boot/dts/am33xx.dtsi
@@ -530,5 +530,13 @@
 			#size-cells = <1>;
 			status = "disabled";
 		};
+
+		rng: rng@48310000 {
+			compatible = "ti,omap4-rng";
+			ti,hwmods = "rng";
+			reg = <0x48310000 0x2000>;
+			interrupts = <111>;
+			status = "disabled";
+		};
 	};
 };
-- 
1.7.9.5


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

* [PATCH 3/3] ARM: dts: AM33xx: Add RNG node
@ 2013-08-06  8:33   ` Lokesh Vutla
  0 siblings, 0 replies; 24+ messages in thread
From: Lokesh Vutla @ 2013-08-06  8:33 UTC (permalink / raw)
  To: linux-arm-kernel

Add the generic AM33xx RNG module's device tree data and
enable it for the am335x-evm, am335x-evmsk, and am335x-bone
platforms.  Also add Documentation file describing the data
for the RNG module.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
---
 .../devicetree/bindings/hwrng/omap_rng.txt         |   22 ++++++++++++++++++++
 arch/arm/boot/dts/am335x-bone.dts                  |    4 ++++
 arch/arm/boot/dts/am335x-evm.dts                   |    4 ++++
 arch/arm/boot/dts/am335x-evmsk.dts                 |    4 ++++
 arch/arm/boot/dts/am33xx.dtsi                      |    8 +++++++
 5 files changed, 42 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/hwrng/omap_rng.txt

diff --git a/Documentation/devicetree/bindings/hwrng/omap_rng.txt b/Documentation/devicetree/bindings/hwrng/omap_rng.txt
new file mode 100644
index 0000000..6a62acd
--- /dev/null
+++ b/Documentation/devicetree/bindings/hwrng/omap_rng.txt
@@ -0,0 +1,22 @@
+OMAP SoC HWRNG Module
+
+Required properties:
+
+- compatible : Should contain entries for this and backward compatible
+  RNG versions:
+  - "ti,omap2-rng" for OMAP2.
+  - "ti,omap4-rng" for OMAP4, OMAP5 and AM33XX.
+  Note that these two versions are incompatible.
+- ti,hwmods: Name of the hwmod associated with the RNG module
+- reg : Offset and length of the register set for the module
+- interrupts : the interrupt number for the RNG module.
+		Only used for "ti,omap4-rng".
+
+Example:
+/* AM335x */
+rng: rng at 48310000 {
+	compatible = "ti,omap4-rng";
+	ti,hwmods = "rng";
+	reg = <0x48310000 0x2000>;
+	interrupts = <111>;
+};
diff --git a/arch/arm/boot/dts/am335x-bone.dts b/arch/arm/boot/dts/am335x-bone.dts
index 444b4ed..46a3887 100644
--- a/arch/arm/boot/dts/am335x-bone.dts
+++ b/arch/arm/boot/dts/am335x-bone.dts
@@ -234,3 +234,7 @@
 	pinctrl-0 = <&davinci_mdio_default>;
 	pinctrl-1 = <&davinci_mdio_sleep>;
 };
+
+&rng {
+	status = "okay";
+};
diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts
index 3aee1a4..ebfbebe1 100644
--- a/arch/arm/boot/dts/am335x-evm.dts
+++ b/arch/arm/boot/dts/am335x-evm.dts
@@ -488,3 +488,7 @@
 		ti,adc-channels = <4 5 6 7>;
 	};
 };
+
+&rng {
+	status = "okay";
+};
diff --git a/arch/arm/boot/dts/am335x-evmsk.dts b/arch/arm/boot/dts/am335x-evmsk.dts
index 0c8ad17..6610a05 100644
--- a/arch/arm/boot/dts/am335x-evmsk.dts
+++ b/arch/arm/boot/dts/am335x-evmsk.dts
@@ -402,3 +402,7 @@
 	phy_id = <&davinci_mdio>, <1>;
 	phy-mode = "rgmii-txid";
 };
+
+&rng {
+	status = "okay";
+};
diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
index 38b446b..b1e6205 100644
--- a/arch/arm/boot/dts/am33xx.dtsi
+++ b/arch/arm/boot/dts/am33xx.dtsi
@@ -530,5 +530,13 @@
 			#size-cells = <1>;
 			status = "disabled";
 		};
+
+		rng: rng at 48310000 {
+			compatible = "ti,omap4-rng";
+			ti,hwmods = "rng";
+			reg = <0x48310000 0x2000>;
+			interrupts = <111>;
+			status = "disabled";
+		};
 	};
 };
-- 
1.7.9.5

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

* Re: [PATCH 3/3] ARM: dts: AM33xx: Add RNG node
  2013-08-06  8:33   ` Lokesh Vutla
@ 2013-08-06 18:17     ` Russ Dill
  -1 siblings, 0 replies; 24+ messages in thread
From: Russ Dill @ 2013-08-06 18:17 UTC (permalink / raw)
  To: Lokesh Vutla
  Cc: linux-omap, linux-arm-kernel, tony, paul, devicetree, rob,
	rnayak, benoit.cousson

On Tue, Aug 6, 2013 at 1:33 AM, Lokesh Vutla <lokeshvutla@ti.com> wrote:
> Add the generic AM33xx RNG module's device tree data and
> enable it for the am335x-evm, am335x-evmsk, and am335x-bone
> platforms.  Also add Documentation file describing the data
> for the RNG module.
>
> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
> ---
>  .../devicetree/bindings/hwrng/omap_rng.txt         |   22 ++++++++++++++++++++
>  arch/arm/boot/dts/am335x-bone.dts                  |    4 ++++
>  arch/arm/boot/dts/am335x-evm.dts                   |    4 ++++
>  arch/arm/boot/dts/am335x-evmsk.dts                 |    4 ++++
>  arch/arm/boot/dts/am33xx.dtsi                      |    8 +++++++
>  5 files changed, 42 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/hwrng/omap_rng.txt
>
> diff --git a/Documentation/devicetree/bindings/hwrng/omap_rng.txt b/Documentation/devicetree/bindings/hwrng/omap_rng.txt
> new file mode 100644
> index 0000000..6a62acd
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/hwrng/omap_rng.txt
> @@ -0,0 +1,22 @@
> +OMAP SoC HWRNG Module
> +
> +Required properties:
> +
> +- compatible : Should contain entries for this and backward compatible
> +  RNG versions:
> +  - "ti,omap2-rng" for OMAP2.
> +  - "ti,omap4-rng" for OMAP4, OMAP5 and AM33XX.
> +  Note that these two versions are incompatible.
> +- ti,hwmods: Name of the hwmod associated with the RNG module
> +- reg : Offset and length of the register set for the module
> +- interrupts : the interrupt number for the RNG module.
> +               Only used for "ti,omap4-rng".
> +
> +Example:
> +/* AM335x */
> +rng: rng@48310000 {
> +       compatible = "ti,omap4-rng";
> +       ti,hwmods = "rng";
> +       reg = <0x48310000 0x2000>;
> +       interrupts = <111>;
> +};
> diff --git a/arch/arm/boot/dts/am335x-bone.dts b/arch/arm/boot/dts/am335x-bone.dts
> index 444b4ed..46a3887 100644
> --- a/arch/arm/boot/dts/am335x-bone.dts
> +++ b/arch/arm/boot/dts/am335x-bone.dts
> @@ -234,3 +234,7 @@
>         pinctrl-0 = <&davinci_mdio_default>;
>         pinctrl-1 = <&davinci_mdio_sleep>;
>  };
> +
> +&rng {
> +       status = "okay";
> +};
> diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts
> index 3aee1a4..ebfbebe1 100644
> --- a/arch/arm/boot/dts/am335x-evm.dts
> +++ b/arch/arm/boot/dts/am335x-evm.dts
> @@ -488,3 +488,7 @@
>                 ti,adc-channels = <4 5 6 7>;
>         };
>  };
> +
> +&rng {
> +       status = "okay";
> +};
> diff --git a/arch/arm/boot/dts/am335x-evmsk.dts b/arch/arm/boot/dts/am335x-evmsk.dts
> index 0c8ad17..6610a05 100644
> --- a/arch/arm/boot/dts/am335x-evmsk.dts
> +++ b/arch/arm/boot/dts/am335x-evmsk.dts
> @@ -402,3 +402,7 @@
>         phy_id = <&davinci_mdio>, <1>;
>         phy-mode = "rgmii-txid";
>  };
> +
> +&rng {
> +       status = "okay";
> +};
> diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
> index 38b446b..b1e6205 100644
> --- a/arch/arm/boot/dts/am33xx.dtsi
> +++ b/arch/arm/boot/dts/am33xx.dtsi
> @@ -530,5 +530,13 @@
>                         #size-cells = <1>;
>                         status = "disabled";
>                 };
> +
> +               rng: rng@48310000 {
> +                       compatible = "ti,omap4-rng";
> +                       ti,hwmods = "rng";
> +                       reg = <0x48310000 0x2000>;
> +                       interrupts = <111>;
> +                       status = "disabled";

Is there any point in making this default to "disabled"? Are there any
am335x platforms where the trng doesn't function?

> +               };
>         };
>  };
> --
> 1.7.9.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH 3/3] ARM: dts: AM33xx: Add RNG node
@ 2013-08-06 18:17     ` Russ Dill
  0 siblings, 0 replies; 24+ messages in thread
From: Russ Dill @ 2013-08-06 18:17 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Aug 6, 2013 at 1:33 AM, Lokesh Vutla <lokeshvutla@ti.com> wrote:
> Add the generic AM33xx RNG module's device tree data and
> enable it for the am335x-evm, am335x-evmsk, and am335x-bone
> platforms.  Also add Documentation file describing the data
> for the RNG module.
>
> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
> ---
>  .../devicetree/bindings/hwrng/omap_rng.txt         |   22 ++++++++++++++++++++
>  arch/arm/boot/dts/am335x-bone.dts                  |    4 ++++
>  arch/arm/boot/dts/am335x-evm.dts                   |    4 ++++
>  arch/arm/boot/dts/am335x-evmsk.dts                 |    4 ++++
>  arch/arm/boot/dts/am33xx.dtsi                      |    8 +++++++
>  5 files changed, 42 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/hwrng/omap_rng.txt
>
> diff --git a/Documentation/devicetree/bindings/hwrng/omap_rng.txt b/Documentation/devicetree/bindings/hwrng/omap_rng.txt
> new file mode 100644
> index 0000000..6a62acd
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/hwrng/omap_rng.txt
> @@ -0,0 +1,22 @@
> +OMAP SoC HWRNG Module
> +
> +Required properties:
> +
> +- compatible : Should contain entries for this and backward compatible
> +  RNG versions:
> +  - "ti,omap2-rng" for OMAP2.
> +  - "ti,omap4-rng" for OMAP4, OMAP5 and AM33XX.
> +  Note that these two versions are incompatible.
> +- ti,hwmods: Name of the hwmod associated with the RNG module
> +- reg : Offset and length of the register set for the module
> +- interrupts : the interrupt number for the RNG module.
> +               Only used for "ti,omap4-rng".
> +
> +Example:
> +/* AM335x */
> +rng: rng at 48310000 {
> +       compatible = "ti,omap4-rng";
> +       ti,hwmods = "rng";
> +       reg = <0x48310000 0x2000>;
> +       interrupts = <111>;
> +};
> diff --git a/arch/arm/boot/dts/am335x-bone.dts b/arch/arm/boot/dts/am335x-bone.dts
> index 444b4ed..46a3887 100644
> --- a/arch/arm/boot/dts/am335x-bone.dts
> +++ b/arch/arm/boot/dts/am335x-bone.dts
> @@ -234,3 +234,7 @@
>         pinctrl-0 = <&davinci_mdio_default>;
>         pinctrl-1 = <&davinci_mdio_sleep>;
>  };
> +
> +&rng {
> +       status = "okay";
> +};
> diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts
> index 3aee1a4..ebfbebe1 100644
> --- a/arch/arm/boot/dts/am335x-evm.dts
> +++ b/arch/arm/boot/dts/am335x-evm.dts
> @@ -488,3 +488,7 @@
>                 ti,adc-channels = <4 5 6 7>;
>         };
>  };
> +
> +&rng {
> +       status = "okay";
> +};
> diff --git a/arch/arm/boot/dts/am335x-evmsk.dts b/arch/arm/boot/dts/am335x-evmsk.dts
> index 0c8ad17..6610a05 100644
> --- a/arch/arm/boot/dts/am335x-evmsk.dts
> +++ b/arch/arm/boot/dts/am335x-evmsk.dts
> @@ -402,3 +402,7 @@
>         phy_id = <&davinci_mdio>, <1>;
>         phy-mode = "rgmii-txid";
>  };
> +
> +&rng {
> +       status = "okay";
> +};
> diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
> index 38b446b..b1e6205 100644
> --- a/arch/arm/boot/dts/am33xx.dtsi
> +++ b/arch/arm/boot/dts/am33xx.dtsi
> @@ -530,5 +530,13 @@
>                         #size-cells = <1>;
>                         status = "disabled";
>                 };
> +
> +               rng: rng at 48310000 {
> +                       compatible = "ti,omap4-rng";
> +                       ti,hwmods = "rng";
> +                       reg = <0x48310000 0x2000>;
> +                       interrupts = <111>;
> +                       status = "disabled";

Is there any point in making this default to "disabled"? Are there any
am335x platforms where the trng doesn't function?

> +               };
>         };
>  };
> --
> 1.7.9.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 3/3] ARM: dts: AM33xx: Add RNG node
  2013-08-06 18:17     ` Russ Dill
@ 2013-08-07  6:17       ` Lokesh Vutla
  -1 siblings, 0 replies; 24+ messages in thread
From: Lokesh Vutla @ 2013-08-07  6:17 UTC (permalink / raw)
  To: Russ Dill
  Cc: devicetree, paul, tony, rnayak, rob, benoit.cousson, linux-omap,
	linux-arm-kernel

On Tuesday 06 August 2013 11:47 PM, Russ Dill wrote:
> On Tue, Aug 6, 2013 at 1:33 AM, Lokesh Vutla <lokeshvutla@ti.com> wrote:
>> Add the generic AM33xx RNG module's device tree data and
>> enable it for the am335x-evm, am335x-evmsk, and am335x-bone
>> platforms.  Also add Documentation file describing the data
>> for the RNG module.
>>
>> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
>> ---
>>  .../devicetree/bindings/hwrng/omap_rng.txt         |   22 ++++++++++++++++++++
>>  arch/arm/boot/dts/am335x-bone.dts                  |    4 ++++
>>  arch/arm/boot/dts/am335x-evm.dts                   |    4 ++++
>>  arch/arm/boot/dts/am335x-evmsk.dts                 |    4 ++++
>>  arch/arm/boot/dts/am33xx.dtsi                      |    8 +++++++
>>  5 files changed, 42 insertions(+)
>>  create mode 100644 Documentation/devicetree/bindings/hwrng/omap_rng.txt
>>
>> diff --git a/Documentation/devicetree/bindings/hwrng/omap_rng.txt b/Documentation/devicetree/bindings/hwrng/omap_rng.txt
>> new file mode 100644
>> index 0000000..6a62acd
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/hwrng/omap_rng.txt
>> @@ -0,0 +1,22 @@
>> +OMAP SoC HWRNG Module
>> +
>> +Required properties:
>> +
>> +- compatible : Should contain entries for this and backward compatible
>> +  RNG versions:
>> +  - "ti,omap2-rng" for OMAP2.
>> +  - "ti,omap4-rng" for OMAP4, OMAP5 and AM33XX.
>> +  Note that these two versions are incompatible.
>> +- ti,hwmods: Name of the hwmod associated with the RNG module
>> +- reg : Offset and length of the register set for the module
>> +- interrupts : the interrupt number for the RNG module.
>> +               Only used for "ti,omap4-rng".
>> +
>> +Example:
>> +/* AM335x */
>> +rng: rng@48310000 {
>> +       compatible = "ti,omap4-rng";
>> +       ti,hwmods = "rng";
>> +       reg = <0x48310000 0x2000>;
>> +       interrupts = <111>;
>> +};
>> diff --git a/arch/arm/boot/dts/am335x-bone.dts b/arch/arm/boot/dts/am335x-bone.dts
>> index 444b4ed..46a3887 100644
>> --- a/arch/arm/boot/dts/am335x-bone.dts
>> +++ b/arch/arm/boot/dts/am335x-bone.dts
>> @@ -234,3 +234,7 @@
>>         pinctrl-0 = <&davinci_mdio_default>;
>>         pinctrl-1 = <&davinci_mdio_sleep>;
>>  };
>> +
>> +&rng {
>> +       status = "okay";
>> +};
>> diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts
>> index 3aee1a4..ebfbebe1 100644
>> --- a/arch/arm/boot/dts/am335x-evm.dts
>> +++ b/arch/arm/boot/dts/am335x-evm.dts
>> @@ -488,3 +488,7 @@
>>                 ti,adc-channels = <4 5 6 7>;
>>         };
>>  };
>> +
>> +&rng {
>> +       status = "okay";
>> +};
>> diff --git a/arch/arm/boot/dts/am335x-evmsk.dts b/arch/arm/boot/dts/am335x-evmsk.dts
>> index 0c8ad17..6610a05 100644
>> --- a/arch/arm/boot/dts/am335x-evmsk.dts
>> +++ b/arch/arm/boot/dts/am335x-evmsk.dts
>> @@ -402,3 +402,7 @@
>>         phy_id = <&davinci_mdio>, <1>;
>>         phy-mode = "rgmii-txid";
>>  };
>> +
>> +&rng {
>> +       status = "okay";
>> +};
>> diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
>> index 38b446b..b1e6205 100644
>> --- a/arch/arm/boot/dts/am33xx.dtsi
>> +++ b/arch/arm/boot/dts/am33xx.dtsi
>> @@ -530,5 +530,13 @@
>>                         #size-cells = <1>;
>>                         status = "disabled";
>>                 };
>> +
>> +               rng: rng@48310000 {
>> +                       compatible = "ti,omap4-rng";
>> +                       ti,hwmods = "rng";
>> +                       reg = <0x48310000 0x2000>;
>> +                       interrupts = <111>;
>> +                       status = "disabled";
> 
> Is there any point in making this default to "disabled"? Are there any
> am335x platforms where the trng doesn't function?
Yes, you are correct. Just followed how aes and sha are done.
ll update and send a v2.

Thanks and regards,
Lokesh
> 
>> +               };
>>         };
>>  };
>> --
>> 1.7.9.5
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH 3/3] ARM: dts: AM33xx: Add RNG node
@ 2013-08-07  6:17       ` Lokesh Vutla
  0 siblings, 0 replies; 24+ messages in thread
From: Lokesh Vutla @ 2013-08-07  6:17 UTC (permalink / raw)
  To: linux-arm-kernel

On Tuesday 06 August 2013 11:47 PM, Russ Dill wrote:
> On Tue, Aug 6, 2013 at 1:33 AM, Lokesh Vutla <lokeshvutla@ti.com> wrote:
>> Add the generic AM33xx RNG module's device tree data and
>> enable it for the am335x-evm, am335x-evmsk, and am335x-bone
>> platforms.  Also add Documentation file describing the data
>> for the RNG module.
>>
>> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
>> ---
>>  .../devicetree/bindings/hwrng/omap_rng.txt         |   22 ++++++++++++++++++++
>>  arch/arm/boot/dts/am335x-bone.dts                  |    4 ++++
>>  arch/arm/boot/dts/am335x-evm.dts                   |    4 ++++
>>  arch/arm/boot/dts/am335x-evmsk.dts                 |    4 ++++
>>  arch/arm/boot/dts/am33xx.dtsi                      |    8 +++++++
>>  5 files changed, 42 insertions(+)
>>  create mode 100644 Documentation/devicetree/bindings/hwrng/omap_rng.txt
>>
>> diff --git a/Documentation/devicetree/bindings/hwrng/omap_rng.txt b/Documentation/devicetree/bindings/hwrng/omap_rng.txt
>> new file mode 100644
>> index 0000000..6a62acd
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/hwrng/omap_rng.txt
>> @@ -0,0 +1,22 @@
>> +OMAP SoC HWRNG Module
>> +
>> +Required properties:
>> +
>> +- compatible : Should contain entries for this and backward compatible
>> +  RNG versions:
>> +  - "ti,omap2-rng" for OMAP2.
>> +  - "ti,omap4-rng" for OMAP4, OMAP5 and AM33XX.
>> +  Note that these two versions are incompatible.
>> +- ti,hwmods: Name of the hwmod associated with the RNG module
>> +- reg : Offset and length of the register set for the module
>> +- interrupts : the interrupt number for the RNG module.
>> +               Only used for "ti,omap4-rng".
>> +
>> +Example:
>> +/* AM335x */
>> +rng: rng at 48310000 {
>> +       compatible = "ti,omap4-rng";
>> +       ti,hwmods = "rng";
>> +       reg = <0x48310000 0x2000>;
>> +       interrupts = <111>;
>> +};
>> diff --git a/arch/arm/boot/dts/am335x-bone.dts b/arch/arm/boot/dts/am335x-bone.dts
>> index 444b4ed..46a3887 100644
>> --- a/arch/arm/boot/dts/am335x-bone.dts
>> +++ b/arch/arm/boot/dts/am335x-bone.dts
>> @@ -234,3 +234,7 @@
>>         pinctrl-0 = <&davinci_mdio_default>;
>>         pinctrl-1 = <&davinci_mdio_sleep>;
>>  };
>> +
>> +&rng {
>> +       status = "okay";
>> +};
>> diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts
>> index 3aee1a4..ebfbebe1 100644
>> --- a/arch/arm/boot/dts/am335x-evm.dts
>> +++ b/arch/arm/boot/dts/am335x-evm.dts
>> @@ -488,3 +488,7 @@
>>                 ti,adc-channels = <4 5 6 7>;
>>         };
>>  };
>> +
>> +&rng {
>> +       status = "okay";
>> +};
>> diff --git a/arch/arm/boot/dts/am335x-evmsk.dts b/arch/arm/boot/dts/am335x-evmsk.dts
>> index 0c8ad17..6610a05 100644
>> --- a/arch/arm/boot/dts/am335x-evmsk.dts
>> +++ b/arch/arm/boot/dts/am335x-evmsk.dts
>> @@ -402,3 +402,7 @@
>>         phy_id = <&davinci_mdio>, <1>;
>>         phy-mode = "rgmii-txid";
>>  };
>> +
>> +&rng {
>> +       status = "okay";
>> +};
>> diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
>> index 38b446b..b1e6205 100644
>> --- a/arch/arm/boot/dts/am33xx.dtsi
>> +++ b/arch/arm/boot/dts/am33xx.dtsi
>> @@ -530,5 +530,13 @@
>>                         #size-cells = <1>;
>>                         status = "disabled";
>>                 };
>> +
>> +               rng: rng at 48310000 {
>> +                       compatible = "ti,omap4-rng";
>> +                       ti,hwmods = "rng";
>> +                       reg = <0x48310000 0x2000>;
>> +                       interrupts = <111>;
>> +                       status = "disabled";
> 
> Is there any point in making this default to "disabled"? Are there any
> am335x platforms where the trng doesn't function?
Yes, you are correct. Just followed how aes and sha are done.
ll update and send a v2.

Thanks and regards,
Lokesh
> 
>> +               };
>>         };
>>  };
>> --
>> 1.7.9.5
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
>> the body of a message to majordomo at vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH V2] ARM: dts: AM33xx: Add RNG node
  2013-08-06  8:33   ` Lokesh Vutla
@ 2013-08-07  6:30     ` Lokesh Vutla
  -1 siblings, 0 replies; 24+ messages in thread
From: Lokesh Vutla @ 2013-08-07  6:30 UTC (permalink / raw)
  To: linux-omap
  Cc: linux-arm-kernel, devicetree, rob, rnayak, Russ.Dill,
	benoit.cousson, lokeshvutla

Add the AM33xx RNG module's device tree data.
Also add Documentation file describing the data
for the RNG module.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
---
Changes since V1:
- Drop "status=disabled" entry in dt node, Since
  RNG is present on all AM33xx platforms.

 .../devicetree/bindings/hwrng/omap_rng.txt         |   22 ++++++++++++++++++++
 arch/arm/boot/dts/am33xx.dtsi                      |    7 +++++++
 2 files changed, 29 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/hwrng/omap_rng.txt

diff --git a/Documentation/devicetree/bindings/hwrng/omap_rng.txt b/Documentation/devicetree/bindings/hwrng/omap_rng.txt
new file mode 100644
index 0000000..6a62acd
--- /dev/null
+++ b/Documentation/devicetree/bindings/hwrng/omap_rng.txt
@@ -0,0 +1,22 @@
+OMAP SoC HWRNG Module
+
+Required properties:
+
+- compatible : Should contain entries for this and backward compatible
+  RNG versions:
+  - "ti,omap2-rng" for OMAP2.
+  - "ti,omap4-rng" for OMAP4, OMAP5 and AM33XX.
+  Note that these two versions are incompatible.
+- ti,hwmods: Name of the hwmod associated with the RNG module
+- reg : Offset and length of the register set for the module
+- interrupts : the interrupt number for the RNG module.
+		Only used for "ti,omap4-rng".
+
+Example:
+/* AM335x */
+rng: rng@48310000 {
+	compatible = "ti,omap4-rng";
+	ti,hwmods = "rng";
+	reg = <0x48310000 0x2000>;
+	interrupts = <111>;
+};
diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
index 38b446b..26ebe30 100644
--- a/arch/arm/boot/dts/am33xx.dtsi
+++ b/arch/arm/boot/dts/am33xx.dtsi
@@ -530,5 +530,12 @@
 			#size-cells = <1>;
 			status = "disabled";
 		};
+
+		rng: rng@48310000 {
+			compatible = "ti,omap4-rng";
+			ti,hwmods = "rng";
+			reg = <0x48310000 0x2000>;
+			interrupts = <111>;
+		};
 	};
 };
-- 
1.7.9.5


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

* [PATCH V2] ARM: dts: AM33xx: Add RNG node
@ 2013-08-07  6:30     ` Lokesh Vutla
  0 siblings, 0 replies; 24+ messages in thread
From: Lokesh Vutla @ 2013-08-07  6:30 UTC (permalink / raw)
  To: linux-arm-kernel

Add the AM33xx RNG module's device tree data.
Also add Documentation file describing the data
for the RNG module.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
---
Changes since V1:
- Drop "status=disabled" entry in dt node, Since
  RNG is present on all AM33xx platforms.

 .../devicetree/bindings/hwrng/omap_rng.txt         |   22 ++++++++++++++++++++
 arch/arm/boot/dts/am33xx.dtsi                      |    7 +++++++
 2 files changed, 29 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/hwrng/omap_rng.txt

diff --git a/Documentation/devicetree/bindings/hwrng/omap_rng.txt b/Documentation/devicetree/bindings/hwrng/omap_rng.txt
new file mode 100644
index 0000000..6a62acd
--- /dev/null
+++ b/Documentation/devicetree/bindings/hwrng/omap_rng.txt
@@ -0,0 +1,22 @@
+OMAP SoC HWRNG Module
+
+Required properties:
+
+- compatible : Should contain entries for this and backward compatible
+  RNG versions:
+  - "ti,omap2-rng" for OMAP2.
+  - "ti,omap4-rng" for OMAP4, OMAP5 and AM33XX.
+  Note that these two versions are incompatible.
+- ti,hwmods: Name of the hwmod associated with the RNG module
+- reg : Offset and length of the register set for the module
+- interrupts : the interrupt number for the RNG module.
+		Only used for "ti,omap4-rng".
+
+Example:
+/* AM335x */
+rng: rng at 48310000 {
+	compatible = "ti,omap4-rng";
+	ti,hwmods = "rng";
+	reg = <0x48310000 0x2000>;
+	interrupts = <111>;
+};
diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
index 38b446b..26ebe30 100644
--- a/arch/arm/boot/dts/am33xx.dtsi
+++ b/arch/arm/boot/dts/am33xx.dtsi
@@ -530,5 +530,12 @@
 			#size-cells = <1>;
 			status = "disabled";
 		};
+
+		rng: rng at 48310000 {
+			compatible = "ti,omap4-rng";
+			ti,hwmods = "rng";
+			reg = <0x48310000 0x2000>;
+			interrupts = <111>;
+		};
 	};
 };
-- 
1.7.9.5

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

* Re: [PATCH 1/3] ARM: AM33xx: hwmod: Add RNG module data
  2013-08-06  8:33   ` Lokesh Vutla
@ 2013-08-28 18:48     ` Paul Walmsley
  -1 siblings, 0 replies; 24+ messages in thread
From: Paul Walmsley @ 2013-08-28 18:48 UTC (permalink / raw)
  To: Lokesh Vutla
  Cc: linux-omap, linux-arm-kernel, tony, devicetree, rob, rnayak,
	benoit.cousson

Hi

On Tue, 6 Aug 2013, Lokesh Vutla wrote:

> Add RNG hwmod data for AM33xx SoC.
> 
> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>

I tried to queue this one, but it caused AM33xx boots to hang.  
Thought it might be related to the patch ordering -- seems to me that 
the clock change patch needed to come before this patch -- but if I 
recall correctly, both BeagleBone and BeagleBone-LT still hung.  

Also, this patch created a sparse warning.

Could you take another look at this patch?  Maybe try basing off of this 
tag:

git://git.kernel.org/pub/scm/linux/kernel/git/pjw/omap-pending.git tags/for-v3.12/omap-prcm-hwmod

Fix the sparse problem, and see if the patch boots for you?

thanks


- Paul

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

* [PATCH 1/3] ARM: AM33xx: hwmod: Add RNG module data
@ 2013-08-28 18:48     ` Paul Walmsley
  0 siblings, 0 replies; 24+ messages in thread
From: Paul Walmsley @ 2013-08-28 18:48 UTC (permalink / raw)
  To: linux-arm-kernel

Hi

On Tue, 6 Aug 2013, Lokesh Vutla wrote:

> Add RNG hwmod data for AM33xx SoC.
> 
> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>

I tried to queue this one, but it caused AM33xx boots to hang.  
Thought it might be related to the patch ordering -- seems to me that 
the clock change patch needed to come before this patch -- but if I 
recall correctly, both BeagleBone and BeagleBone-LT still hung.  

Also, this patch created a sparse warning.

Could you take another look at this patch?  Maybe try basing off of this 
tag:

git://git.kernel.org/pub/scm/linux/kernel/git/pjw/omap-pending.git tags/for-v3.12/omap-prcm-hwmod

Fix the sparse problem, and see if the patch boots for you?

thanks


- Paul

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

* Re: [PATCH 1/3] ARM: AM33xx: hwmod: Add RNG module data
  2013-08-28 18:48     ` Paul Walmsley
@ 2013-08-29  9:22       ` Lokesh Vutla
  -1 siblings, 0 replies; 24+ messages in thread
From: Lokesh Vutla @ 2013-08-29  9:22 UTC (permalink / raw)
  To: Paul Walmsley
  Cc: linux-omap, linux-arm-kernel, tony, devicetree, rob, rnayak,
	benoit.cousson

Hi Paul,
On Thursday 29 August 2013 12:18 AM, Paul Walmsley wrote:
> Hi
> 
> On Tue, 6 Aug 2013, Lokesh Vutla wrote:
> 
>> Add RNG hwmod data for AM33xx SoC.
>>
>> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
> 
> I tried to queue this one, but it caused AM33xx boots to hang.  
> Thought it might be related to the patch ordering -- seems to me that 
> the clock change patch needed to come before this patch -- but if I 
> recall correctly, both BeagleBone and BeagleBone-LT still hung. 
This is because register address space is not passed in hwmod_data as it
is passed from dt. So we need to include 3/3 patch in this series to boot.

Ill fix this sparse warning and post a v2.

PS: Probe for this driver will be failed even after this. Support for this version
of rng ip is already posted and pushed into cryptodev-2.6 tree.

Thanks and regards,
Lokesh
> 
> Also, this patch created a sparse warning.
> 
> Could you take another look at this patch?  Maybe try basing off of this 
> tag:
> 
> git://git.kernel.org/pub/scm/linux/kernel/git/pjw/omap-pending.git tags/for-v3.12/omap-prcm-hwmod
> 
> Fix the sparse problem, and see if the patch boots for you?
> 
> thanks
> 
> 
> - Paul
> 


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

* [PATCH 1/3] ARM: AM33xx: hwmod: Add RNG module data
@ 2013-08-29  9:22       ` Lokesh Vutla
  0 siblings, 0 replies; 24+ messages in thread
From: Lokesh Vutla @ 2013-08-29  9:22 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Paul,
On Thursday 29 August 2013 12:18 AM, Paul Walmsley wrote:
> Hi
> 
> On Tue, 6 Aug 2013, Lokesh Vutla wrote:
> 
>> Add RNG hwmod data for AM33xx SoC.
>>
>> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
> 
> I tried to queue this one, but it caused AM33xx boots to hang.  
> Thought it might be related to the patch ordering -- seems to me that 
> the clock change patch needed to come before this patch -- but if I 
> recall correctly, both BeagleBone and BeagleBone-LT still hung. 
This is because register address space is not passed in hwmod_data as it
is passed from dt. So we need to include 3/3 patch in this series to boot.

Ill fix this sparse warning and post a v2.

PS: Probe for this driver will be failed even after this. Support for this version
of rng ip is already posted and pushed into cryptodev-2.6 tree.

Thanks and regards,
Lokesh
> 
> Also, this patch created a sparse warning.
> 
> Could you take another look at this patch?  Maybe try basing off of this 
> tag:
> 
> git://git.kernel.org/pub/scm/linux/kernel/git/pjw/omap-pending.git tags/for-v3.12/omap-prcm-hwmod
> 
> Fix the sparse problem, and see if the patch boots for you?
> 
> thanks
> 
> 
> - Paul
> 

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

* [PATCH V2 1/3] ARM: AM33xx: hwmod: Add RNG module data
  2013-08-06  8:33   ` Lokesh Vutla
@ 2013-08-29  9:34     ` Lokesh Vutla
  -1 siblings, 0 replies; 24+ messages in thread
From: Lokesh Vutla @ 2013-08-29  9:34 UTC (permalink / raw)
  To: paul, linux-omap; +Cc: linux-arm-kernel, bcousson, tony, rnayak, lokeshvutla

Add RNG hwmod data for AM33xx SoC.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
---
Changes since V1:
* Rebased on top of Paul's tree:
  git://git.kernel.org/pub/scm/linux/kernel/git/pjw/omap-pending.git tags/for-v3.12/omap-prcm-hwmod 
* Made am33xx_l4_per__rng structure as static to fix sparse warning
* Updated am33xx_rng_hwmod flags

 arch/arm/mach-omap2/omap_hwmod_33xx_data.c |   36 ++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
index 215894f..3e32f45 100644
--- a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
@@ -2480,6 +2480,41 @@ static struct omap_hwmod_ocp_if am33xx_l3_main__aes0 = {
 	.user		= OCP_USER_MPU | OCP_USER_SDMA,
 };
 
+/* rng */
+static struct omap_hwmod_class_sysconfig am33xx_rng_sysc = {
+	.rev_offs	= 0x1fe0,
+	.sysc_offs	= 0x1fe4,
+	.sysc_flags	= SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE,
+	.idlemodes	= SIDLE_FORCE | SIDLE_NO,
+	.sysc_fields	= &omap_hwmod_sysc_type1,
+};
+
+static struct omap_hwmod_class am33xx_rng_hwmod_class = {
+	.name		= "rng",
+	.sysc		= &am33xx_rng_sysc,
+};
+
+static struct omap_hwmod am33xx_rng_hwmod = {
+	.name		= "rng",
+	.class		= &am33xx_rng_hwmod_class,
+	.clkdm_name	= "l4ls_clkdm",
+	.flags		= HWMOD_SWSUP_SIDLE,
+	.main_clk	= "rng_fck",
+	.prcm		= {
+		.omap4	= {
+			.clkctrl_offs	= AM33XX_CM_PER_RNG_CLKCTRL_OFFSET,
+			.modulemode	= MODULEMODE_SWCTRL,
+		},
+	},
+};
+
+static struct omap_hwmod_ocp_if am33xx_l4_per__rng = {
+	.master		= &am33xx_l4_ls_hwmod,
+	.slave		= &am33xx_rng_hwmod,
+	.clk		= "rng_fck",
+	.user		= OCP_USER_MPU,
+};
+
 static struct omap_hwmod_ocp_if *am33xx_hwmod_ocp_ifs[] __initdata = {
 	&am33xx_l3_main__emif,
 	&am33xx_mpu__l3_main,
@@ -2559,6 +2594,7 @@ static struct omap_hwmod_ocp_if *am33xx_hwmod_ocp_ifs[] __initdata = {
 	&am33xx_cpgmac0__mdio,
 	&am33xx_l3_main__sha0,
 	&am33xx_l3_main__aes0,
+	&am33xx_l4_per__rng,
 	NULL,
 };
 
-- 
1.7.9.5


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

* [PATCH V2 1/3] ARM: AM33xx: hwmod: Add RNG module data
@ 2013-08-29  9:34     ` Lokesh Vutla
  0 siblings, 0 replies; 24+ messages in thread
From: Lokesh Vutla @ 2013-08-29  9:34 UTC (permalink / raw)
  To: linux-arm-kernel

Add RNG hwmod data for AM33xx SoC.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
---
Changes since V1:
* Rebased on top of Paul's tree:
  git://git.kernel.org/pub/scm/linux/kernel/git/pjw/omap-pending.git tags/for-v3.12/omap-prcm-hwmod 
* Made am33xx_l4_per__rng structure as static to fix sparse warning
* Updated am33xx_rng_hwmod flags

 arch/arm/mach-omap2/omap_hwmod_33xx_data.c |   36 ++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
index 215894f..3e32f45 100644
--- a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
@@ -2480,6 +2480,41 @@ static struct omap_hwmod_ocp_if am33xx_l3_main__aes0 = {
 	.user		= OCP_USER_MPU | OCP_USER_SDMA,
 };
 
+/* rng */
+static struct omap_hwmod_class_sysconfig am33xx_rng_sysc = {
+	.rev_offs	= 0x1fe0,
+	.sysc_offs	= 0x1fe4,
+	.sysc_flags	= SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE,
+	.idlemodes	= SIDLE_FORCE | SIDLE_NO,
+	.sysc_fields	= &omap_hwmod_sysc_type1,
+};
+
+static struct omap_hwmod_class am33xx_rng_hwmod_class = {
+	.name		= "rng",
+	.sysc		= &am33xx_rng_sysc,
+};
+
+static struct omap_hwmod am33xx_rng_hwmod = {
+	.name		= "rng",
+	.class		= &am33xx_rng_hwmod_class,
+	.clkdm_name	= "l4ls_clkdm",
+	.flags		= HWMOD_SWSUP_SIDLE,
+	.main_clk	= "rng_fck",
+	.prcm		= {
+		.omap4	= {
+			.clkctrl_offs	= AM33XX_CM_PER_RNG_CLKCTRL_OFFSET,
+			.modulemode	= MODULEMODE_SWCTRL,
+		},
+	},
+};
+
+static struct omap_hwmod_ocp_if am33xx_l4_per__rng = {
+	.master		= &am33xx_l4_ls_hwmod,
+	.slave		= &am33xx_rng_hwmod,
+	.clk		= "rng_fck",
+	.user		= OCP_USER_MPU,
+};
+
 static struct omap_hwmod_ocp_if *am33xx_hwmod_ocp_ifs[] __initdata = {
 	&am33xx_l3_main__emif,
 	&am33xx_mpu__l3_main,
@@ -2559,6 +2594,7 @@ static struct omap_hwmod_ocp_if *am33xx_hwmod_ocp_ifs[] __initdata = {
 	&am33xx_cpgmac0__mdio,
 	&am33xx_l3_main__sha0,
 	&am33xx_l3_main__aes0,
+	&am33xx_l4_per__rng,
 	NULL,
 };
 
-- 
1.7.9.5

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

* Re: [PATCH 1/3] ARM: AM33xx: hwmod: Add RNG module data
  2013-08-29  9:22       ` Lokesh Vutla
@ 2013-08-29 11:30         ` Paul Walmsley
  -1 siblings, 0 replies; 24+ messages in thread
From: Paul Walmsley @ 2013-08-29 11:30 UTC (permalink / raw)
  To: Lokesh Vutla
  Cc: linux-omap, linux-arm-kernel, tony, devicetree, rob, rnayak,
	benoit.cousson

Hi

On Thu, 29 Aug 2013, Lokesh Vutla wrote:

> On Thursday 29 August 2013 12:18 AM, Paul Walmsley wrote:
> > Hi
> > 
> > On Tue, 6 Aug 2013, Lokesh Vutla wrote:
> > 
> >> Add RNG hwmod data for AM33xx SoC.
> >>
> >> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
> > 
> > I tried to queue this one, but it caused AM33xx boots to hang.  
> > Thought it might be related to the patch ordering -- seems to me that 
> > the clock change patch needed to come before this patch -- but if I 
> > recall correctly, both BeagleBone and BeagleBone-LT still hung. 
> This is because register address space is not passed in hwmod_data as it
> is passed from dt. So we need to include 3/3 patch in this series to boot.

So this patch has a dependency on a DT data patch?  If so then please 
upstream that through Benoit, and put in the patch description on this 
patch that there's a dependency on that patch.  If you post those together 
in a series, please make sure that the DT patch comes first so it doesn't 
break 'git bisect'. 

I've already queued the clock change patch for upstream.

> PS: Probe for this driver will be failed even after this. Support for 
> this version of rng ip is already posted and pushed into cryptodev-2.6 
> tree.

I don't quite understand, could you please rephrase?

- Paul

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

* [PATCH 1/3] ARM: AM33xx: hwmod: Add RNG module data
@ 2013-08-29 11:30         ` Paul Walmsley
  0 siblings, 0 replies; 24+ messages in thread
From: Paul Walmsley @ 2013-08-29 11:30 UTC (permalink / raw)
  To: linux-arm-kernel

Hi

On Thu, 29 Aug 2013, Lokesh Vutla wrote:

> On Thursday 29 August 2013 12:18 AM, Paul Walmsley wrote:
> > Hi
> > 
> > On Tue, 6 Aug 2013, Lokesh Vutla wrote:
> > 
> >> Add RNG hwmod data for AM33xx SoC.
> >>
> >> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
> > 
> > I tried to queue this one, but it caused AM33xx boots to hang.  
> > Thought it might be related to the patch ordering -- seems to me that 
> > the clock change patch needed to come before this patch -- but if I 
> > recall correctly, both BeagleBone and BeagleBone-LT still hung. 
> This is because register address space is not passed in hwmod_data as it
> is passed from dt. So we need to include 3/3 patch in this series to boot.

So this patch has a dependency on a DT data patch?  If so then please 
upstream that through Benoit, and put in the patch description on this 
patch that there's a dependency on that patch.  If you post those together 
in a series, please make sure that the DT patch comes first so it doesn't 
break 'git bisect'. 

I've already queued the clock change patch for upstream.

> PS: Probe for this driver will be failed even after this. Support for 
> this version of rng ip is already posted and pushed into cryptodev-2.6 
> tree.

I don't quite understand, could you please rephrase?

- Paul

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

* Re: [PATCH 1/3] ARM: AM33xx: hwmod: Add RNG module data
  2013-08-29 11:30         ` Paul Walmsley
@ 2013-08-29 12:05           ` Lokesh Vutla
  -1 siblings, 0 replies; 24+ messages in thread
From: Lokesh Vutla @ 2013-08-29 12:05 UTC (permalink / raw)
  To: Paul Walmsley
  Cc: linux-omap, linux-arm-kernel, tony, devicetree, rob, rnayak,
	benoit.cousson

Hi Paul,

On Thursday 29 August 2013 05:00 PM, Paul Walmsley wrote:
> Hi
> 
> On Thu, 29 Aug 2013, Lokesh Vutla wrote:
> 
>> On Thursday 29 August 2013 12:18 AM, Paul Walmsley wrote:
>>> Hi
>>>
>>> On Tue, 6 Aug 2013, Lokesh Vutla wrote:
>>>
>>>> Add RNG hwmod data for AM33xx SoC.
>>>>
>>>> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
>>>
>>> I tried to queue this one, but it caused AM33xx boots to hang.  
>>> Thought it might be related to the patch ordering -- seems to me that 
>>> the clock change patch needed to come before this patch -- but if I 
>>> recall correctly, both BeagleBone and BeagleBone-LT still hung. 
>> This is because register address space is not passed in hwmod_data as it
>> is passed from dt. So we need to include 3/3 patch in this series to boot.
> 
> So this patch has a dependency on a DT data patch?  If so then please 
> upstream that through Benoit, and put in the patch description on this 
> patch that there's a dependency on that patch.  If you post those together 
> in a series, please make sure that the DT patch comes first so it doesn't 
> break 'git bisect'.
Ok, Ill repost these two patches and make sure that DT patch comes first
so that 'git bisect' will not break..
 
> 
> I've already queued the clock change patch for upstream.
> 
>> PS: Probe for this driver will be failed even after this. Support for 
>> this version of rng ip is already posted and pushed into cryptodev-2.6 
>> tree.
> 
> I don't quite understand, could you please rephrase?
I just meant that with these patches RNG IP as such is not functional
without the driver changes. 

Thanks and Regards,
Lokesh
> 
> - Paul
> 


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

* [PATCH 1/3] ARM: AM33xx: hwmod: Add RNG module data
@ 2013-08-29 12:05           ` Lokesh Vutla
  0 siblings, 0 replies; 24+ messages in thread
From: Lokesh Vutla @ 2013-08-29 12:05 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Paul,

On Thursday 29 August 2013 05:00 PM, Paul Walmsley wrote:
> Hi
> 
> On Thu, 29 Aug 2013, Lokesh Vutla wrote:
> 
>> On Thursday 29 August 2013 12:18 AM, Paul Walmsley wrote:
>>> Hi
>>>
>>> On Tue, 6 Aug 2013, Lokesh Vutla wrote:
>>>
>>>> Add RNG hwmod data for AM33xx SoC.
>>>>
>>>> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
>>>
>>> I tried to queue this one, but it caused AM33xx boots to hang.  
>>> Thought it might be related to the patch ordering -- seems to me that 
>>> the clock change patch needed to come before this patch -- but if I 
>>> recall correctly, both BeagleBone and BeagleBone-LT still hung. 
>> This is because register address space is not passed in hwmod_data as it
>> is passed from dt. So we need to include 3/3 patch in this series to boot.
> 
> So this patch has a dependency on a DT data patch?  If so then please 
> upstream that through Benoit, and put in the patch description on this 
> patch that there's a dependency on that patch.  If you post those together 
> in a series, please make sure that the DT patch comes first so it doesn't 
> break 'git bisect'.
Ok, Ill repost these two patches and make sure that DT patch comes first
so that 'git bisect' will not break..
 
> 
> I've already queued the clock change patch for upstream.
> 
>> PS: Probe for this driver will be failed even after this. Support for 
>> this version of rng ip is already posted and pushed into cryptodev-2.6 
>> tree.
> 
> I don't quite understand, could you please rephrase?
I just meant that with these patches RNG IP as such is not functional
without the driver changes. 

Thanks and Regards,
Lokesh
> 
> - Paul
> 

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

end of thread, other threads:[~2013-08-29 12:05 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-06  8:33 [PATCH 0/3] ARM: AM33xx: Add RNG module data Lokesh Vutla
2013-08-06  8:33 ` Lokesh Vutla
2013-08-06  8:33 ` [PATCH 1/3] ARM: AM33xx: hwmod: " Lokesh Vutla
2013-08-06  8:33   ` Lokesh Vutla
2013-08-28 18:48   ` Paul Walmsley
2013-08-28 18:48     ` Paul Walmsley
2013-08-29  9:22     ` Lokesh Vutla
2013-08-29  9:22       ` Lokesh Vutla
2013-08-29 11:30       ` Paul Walmsley
2013-08-29 11:30         ` Paul Walmsley
2013-08-29 12:05         ` Lokesh Vutla
2013-08-29 12:05           ` Lokesh Vutla
2013-08-29  9:34   ` [PATCH V2 " Lokesh Vutla
2013-08-29  9:34     ` Lokesh Vutla
2013-08-06  8:33 ` [PATCH 2/3] ARM: AM33xx: clock: Add RNG clock data Lokesh Vutla
2013-08-06  8:33   ` Lokesh Vutla
2013-08-06  8:33 ` [PATCH 3/3] ARM: dts: AM33xx: Add RNG node Lokesh Vutla
2013-08-06  8:33   ` Lokesh Vutla
2013-08-06 18:17   ` Russ Dill
2013-08-06 18:17     ` Russ Dill
2013-08-07  6:17     ` Lokesh Vutla
2013-08-07  6:17       ` Lokesh Vutla
2013-08-07  6:30   ` [PATCH V2] " Lokesh Vutla
2013-08-07  6:30     ` Lokesh Vutla

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.