linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] ARM: OMAP4: add support for some crypto features
@ 2017-06-13 13:45 Tero Kristo
  2017-06-13 13:45 ` [PATCH 1/3] ARM: dts: omap4: add aes2 instance Tero Kristo
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Tero Kristo @ 2017-06-13 13:45 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

This series adds a few patches missing from Sebastian's series here:
https://lkml.org/lkml/2017/6/13/266

Only the sham patches in this series work standalone, the two
series should be combined together to apply properly and to avoid
any boot warnings (missing DT data for hwmods.)

-Tero

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

* [PATCH 1/3] ARM: dts: omap4: add aes2 instance
  2017-06-13 13:45 [PATCH 0/3] ARM: OMAP4: add support for some crypto features Tero Kristo
@ 2017-06-13 13:45 ` Tero Kristo
  2017-06-13 13:45 ` [PATCH 2/3] ARM: dts: omap4: add SHAM node Tero Kristo
  2017-06-13 13:45 ` [PATCH 3/3] ARM: OMAP4: hwmod_data: add SHAM crypto accelerator Tero Kristo
  2 siblings, 0 replies; 4+ messages in thread
From: Tero Kristo @ 2017-06-13 13:45 UTC (permalink / raw)
  To: linux-arm-kernel

OMAP4 has AES2 instance, so add its integration data under DT.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
---
 arch/arm/boot/dts/omap4.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi
index 589690e..00e7656 100644
--- a/arch/arm/boot/dts/omap4.dtsi
+++ b/arch/arm/boot/dts/omap4.dtsi
@@ -909,6 +909,15 @@
 			dma-names = "tx", "rx";
 		};
 
+		aes2: aes at 4b701000 {
+			compatible = "ti,omap4-aes";
+			ti,hwmods = "aes2";
+			reg = <0x4b701000 0xa0>;
+			interrupts = <GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>;
+			dmas = <&sdma 114>, <&sdma 113>;
+			dma-names = "tx", "rx";
+		};
+
 		des: des at 480a5000 {
 			compatible = "ti,omap4-des";
 			ti,hwmods = "des";
-- 
1.9.1

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

* [PATCH 2/3] ARM: dts: omap4: add SHAM node
  2017-06-13 13:45 [PATCH 0/3] ARM: OMAP4: add support for some crypto features Tero Kristo
  2017-06-13 13:45 ` [PATCH 1/3] ARM: dts: omap4: add aes2 instance Tero Kristo
@ 2017-06-13 13:45 ` Tero Kristo
  2017-06-13 13:45 ` [PATCH 3/3] ARM: OMAP4: hwmod_data: add SHAM crypto accelerator Tero Kristo
  2 siblings, 0 replies; 4+ messages in thread
From: Tero Kristo @ 2017-06-13 13:45 UTC (permalink / raw)
  To: linux-arm-kernel

Add SHAM crypto accelerator.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
---
 arch/arm/boot/dts/omap4.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi
index 00e7656..64d00f5 100644
--- a/arch/arm/boot/dts/omap4.dtsi
+++ b/arch/arm/boot/dts/omap4.dtsi
@@ -927,6 +927,15 @@
 			dma-names = "tx", "rx";
 		};
 
+		sham: sham at 4b100000 {
+			compatible = "ti,omap4-sham";
+			ti,hwmods = "sham";
+			reg = <0x4b100000 0x300>;
+			interrupts = <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>;
+			dmas = <&sdma 119>;
+			dma-names = "rx";
+		};
+
 		abb_mpu: regulator-abb-mpu {
 			compatible = "ti,abb-v2";
 			regulator-name = "abb_mpu";
-- 
1.9.1

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

* [PATCH 3/3] ARM: OMAP4: hwmod_data: add SHAM crypto accelerator
  2017-06-13 13:45 [PATCH 0/3] ARM: OMAP4: add support for some crypto features Tero Kristo
  2017-06-13 13:45 ` [PATCH 1/3] ARM: dts: omap4: add aes2 instance Tero Kristo
  2017-06-13 13:45 ` [PATCH 2/3] ARM: dts: omap4: add SHAM node Tero Kristo
@ 2017-06-13 13:45 ` Tero Kristo
  2 siblings, 0 replies; 4+ messages in thread
From: Tero Kristo @ 2017-06-13 13:45 UTC (permalink / raw)
  To: linux-arm-kernel

OMAP4 SoC contains SHAM crypto hardware accelerator. Add hwmod data for
this IP so that it can be utilized by crypto frameworks.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
---
 arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 37 ++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
index 6353e8d..7580db5 100644
--- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
@@ -872,6 +872,33 @@
 	.parent_hwmod	= &omap44xx_dss_hwmod,
 };
 
+/* sha0 HIB2 (the 'P' (public) device) */
+static struct omap_hwmod_class_sysconfig omap44xx_sha0_sysc = {
+	.rev_offs	= 0x100,
+	.sysc_offs	= 0x110,
+	.syss_offs	= 0x114,
+	.sysc_flags	= SYSS_HAS_RESET_STATUS,
+};
+
+static struct omap_hwmod_class omap44xx_sha0_hwmod_class = {
+	.name		= "sham",
+	.sysc		= &omap44xx_sha0_sysc,
+};
+
+struct omap_hwmod omap44xx_sha0_hwmod = {
+	.name		= "sham",
+	.class		= &omap44xx_sha0_hwmod_class,
+	.clkdm_name	= "l4_secure_clkdm",
+	.main_clk	= "l3_div_ck",
+	.prcm		= {
+		.omap4 = {
+			.clkctrl_offs = OMAP4_CM_L4SEC_SHA2MD51_CLKCTRL_OFFSET,
+			.context_offs = OMAP4_RM_L4SEC_SHA2MD51_CONTEXT_OFFSET,
+			.modulemode   = MODULEMODE_SWCTRL,
+		},
+	},
+};
+
 /*
  * 'elm' class
  * bch error location module
@@ -3979,6 +4007,14 @@ struct omap_hwmod_ocp_if omap44xx_l3_main_2__des = {
 	.user		= OCP_USER_MPU,
 };
 
+/* l3_main_2 -> sham */
+static struct omap_hwmod_ocp_if omap44xx_l3_main_2__sha0 = {
+	.master		= &omap44xx_l3_main_2_hwmod,
+	.slave		= &omap44xx_sha0_hwmod,
+	.clk		= "l3_div_ck",
+	.user		= OCP_USER_MPU | OCP_USER_SDMA,
+};
+
 /* l4_per -> elm */
 static struct omap_hwmod_ocp_if omap44xx_l4_per__elm = {
 	.master		= &omap44xx_l4_per_hwmod,
@@ -4893,6 +4929,7 @@ struct omap_hwmod_ocp_if omap44xx_l3_main_2__des = {
 	&omap44xx_l3_main_2__aes1,
 	&omap44xx_l3_main_2__aes2,
 	&omap44xx_l3_main_2__des,
+	&omap44xx_l3_main_2__sha0,
 	NULL,
 };
 
-- 
1.9.1

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

end of thread, other threads:[~2017-06-13 13:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-13 13:45 [PATCH 0/3] ARM: OMAP4: add support for some crypto features Tero Kristo
2017-06-13 13:45 ` [PATCH 1/3] ARM: dts: omap4: add aes2 instance Tero Kristo
2017-06-13 13:45 ` [PATCH 2/3] ARM: dts: omap4: add SHAM node Tero Kristo
2017-06-13 13:45 ` [PATCH 3/3] ARM: OMAP4: hwmod_data: add SHAM crypto accelerator Tero Kristo

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).