Skip to contentSkip to conversation

ARM: dts: omap3: Migrate AES from hwmods to sysc-omap2

PATCH In review Adam Ford 2 participants 6 messages May 4, 2020 – Jun 13, 2020

Subsystems (5)
lore
Share & tools
lore

Adam Ford

author
#0 lore raw

PATCH 1/1 ARM: dts: omap3: Migrate AES from hwmods to sysc-omap2

Various OMAP3 boards have two AES blocks, but only one is currently available, because the hwmods are only configured for one.

This patch migrates the hwmods for the AES engine to sysc-omap2 which allows the second AES crypto engine to become available.

omap-aes 480a6000.aes1: OMAP AES hw accel rev: 2.6 omap-aes 480a6000.aes1: will run requests pump with realtime priority omap-aes 480c5000.aes2: OMAP AES hw accel rev: 2.6 omap-aes 480c5000.aes2: will run requests pump with realtime priority

arch/arm/boot/dts/omap3.dtsi +50 -7
index adcdf88717a3..376628b32f77 100644
@@ -157,13 +157,56 @@ omap3_pmx_wkup: pinmux@a00 {
 			};
 		};
 
-		aes: aes@480c5000 {
-			compatible = "ti,omap3-aes";
-			ti,hwmods = "aes";
-			reg = <0x480c5000 0x50>;
-			interrupts = <0>;
-			dmas = <&sdma 65 &sdma 66>;
-			dma-names = "tx", "rx";
+		aes1_target: target-module@480a6000 {
+			compatible = "ti,sysc-omap2", "ti,sysc";
+			reg = <0x480a6044 0x4>,
+			      <0x480a6048 0x4>,
+			      <0x480a604c 0x4>;
+			reg-names = "rev", "sysc", "syss";
+			ti,sysc-mask = <(SYSC_OMAP2_AUTOIDLE)>;
+			ti,sysc-sidle = <SYSC_IDLE_FORCE>,
+					<SYSC_IDLE_NO>,
+					<SYSC_IDLE_SMART>;
+			ti,syss-mask = <1>;
+			clocks = <&aes1_ick>;
+			clock-names = "ick";
+			#address-cells = <1>;
+			#size-cells = <1>;
+			ranges = <0 0x480a6000 0x2000>;
+
+			aes1: aes1@0 {
+				compatible = "ti,omap3-aes";
+				reg = <0 0x50>;
+				interrupts = <0>;
+				dmas = <&sdma 65 &sdma 66>;
+				dma-names = "tx", "rx";
+			};
+		};
+
+		aes2_target: target-module@480c5000 {
+			compatible = "ti,sysc-omap2", "ti,sysc";
+			reg = <0x480c5044 0x4>,
+			      <0x480c5048 0x4>,
+			      <0x480c504c 0x4>;
+			reg-names = "rev", "sysc", "syss";
+			ti,sysc-mask = <(SYSC_OMAP2_AUTOIDLE)>;
+			ti,sysc-sidle = <SYSC_IDLE_FORCE>,
+					<SYSC_IDLE_NO>,
+					<SYSC_IDLE_SMART>;
+			ti,syss-mask = <1>;
+			clocks = <&aes2_ick>;
+			clock-names = "ick";
+			#address-cells = <1>;
+			#size-cells = <1>;
+			ranges = <0 0x480c5000 0x2000>;
+
+			aes2: aes2@0 {
+				compatible = "ti,omap3-aes";
+				reg = <0 0x50>;
+				interrupts = <0>;
+				dmas = <&sdma 65 &sdma 66>;
+				dma-names = "tx", "rx";
+			};
 		};
 
 		prm: prm@48306000 {
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +0 -61

109 lines not on this page · raw message

Signature · 1 line
2.25.1
maintainer
#1 lore raw
Quoted 10 lines · Adam Ford

Various OMAP3 boards have two AES blocks, but only one is currently available, because the hwmods are only configured for one.

This patch migrates the hwmods for the AES engine to sysc-omap2 which allows the second AES crypto engine to become available.

omap-aes 480a6000.aes1: OMAP AES hw accel rev: 2.6 omap-aes 480a6000.aes1: will run requests pump with realtime priority omap-aes 480c5000.aes2: OMAP AES hw accel rev: 2.6 omap-aes 480c5000.aes2: will run requests pump with realtime priority

Great :) Looks like I'm getting the following though:

DTC arch/arm/boot/dts/am3517-craneboard.dtb
arch/arm/boot/dts/omap3.dtsi:160.39-184.5: ERROR (phandle_references):
/ocp@68000000/target-module@480a6000:
Reference to non-existent node or label "aes1_ick"

Is this patch maybe missing a change for am3717 for the aes1_ick?

Regards,

Tony

author
#2 lore raw
Quoted 13 lines · Tony Lindgren
Quoted 10 lines · Adam Ford

Various OMAP3 boards have two AES blocks, but only one is currently available, because the hwmods are only configured for one.

This patch migrates the hwmods for the AES engine to sysc-omap2 which allows the second AES crypto engine to become available.

omap-aes 480a6000.aes1: OMAP AES hw accel rev: 2.6 omap-aes 480a6000.aes1: will run requests pump with realtime priority omap-aes 480c5000.aes2: OMAP AES hw accel rev: 2.6 omap-aes 480c5000.aes2: will run requests pump with realtime priority

Quoted 8 lines

Great :) Looks like I'm getting the following though:

DTC arch/arm/boot/dts/am3517-craneboard.dtb
arch/arm/boot/dts/omap3.dtsi:160.39-184.5: ERROR (phandle_references):
/ocp@68000000/target-module@480a6000:
Reference to non-existent node or label "aes1_ick"

Is this patch maybe missing a change for am3717 for the aes1_ick?

I am guessing it's the same issue that plagues the am3517 with a note in the hwmods that stated noone seems to know which am3517's support it and which don't. The RNG was disabled on the 3517, so I am guessing I'll do the same for AES.
I should have posted it as an RFC, because I don't have the proper IRQ setup for the newly supported AES engine. The interrupts that are used for the original AES are listed as 'Resereved' in the AM3517 TRM. I assume the second engine uses different interrupts. I don't suppose anyone know what it should be?

adam

Quoted 4 lines

Regards,

Tony

maintainer
#3 lore raw
Quoted 21 lines · Adam Ford
Quoted 20 lines · Tony Lindgren
Quoted 10 lines · Adam Ford

Various OMAP3 boards have two AES blocks, but only one is currently available, because the hwmods are only configured for one.

This patch migrates the hwmods for the AES engine to sysc-omap2 which allows the second AES crypto engine to become available.

omap-aes 480a6000.aes1: OMAP AES hw accel rev: 2.6 omap-aes 480a6000.aes1: will run requests pump with realtime priority omap-aes 480c5000.aes2: OMAP AES hw accel rev: 2.6 omap-aes 480c5000.aes2: will run requests pump with realtime priority

Great :) Looks like I'm getting the following though:

DTC arch/arm/boot/dts/am3517-craneboard.dtb
arch/arm/boot/dts/omap3.dtsi:160.39-184.5: ERROR (phandle_references):
/ocp@68000000/target-module@480a6000:
Reference to non-existent node or label "aes1_ick"

Quoted 6 lines
Quoted 1 line

Is this patch maybe missing a change for am3717 for the aes1_ick?

I am guessing it's the same issue that plagues the am3517 with a note in the hwmods that stated noone seems to know which am3517's support it and which don't. The RNG was disabled on the 3517, so I am guessing I'll do the same for AES.

OK, I have no idea what modules might be there on am3517.

Quoted 5 lines

I should have posted it as an RFC, because I don't have the proper IRQ setup for the newly supported AES engine. The interrupts that are used for the original AES are listed as 'Resereved' in the AM3517 TRM. I assume the second engine uses different interrupts. I don't suppose anyone know what it should be?

Sorry no idea, usually the secure accelerator documentation is just left out it seems. My guess the values are the same as on omap3.

Regards,

Tony

author
#4 lore raw
Quoted 23 lines · Tony Lindgren
Quoted 21 lines · Adam Ford
Quoted 20 lines · Tony Lindgren
Quoted 10 lines · Adam Ford

Various OMAP3 boards have two AES blocks, but only one is currently available, because the hwmods are only configured for one.

This patch migrates the hwmods for the AES engine to sysc-omap2 which allows the second AES crypto engine to become available.

omap-aes 480a6000.aes1: OMAP AES hw accel rev: 2.6 omap-aes 480a6000.aes1: will run requests pump with realtime priority omap-aes 480c5000.aes2: OMAP AES hw accel rev: 2.6 omap-aes 480c5000.aes2: will run requests pump with realtime priority

Great :) Looks like I'm getting the following though:

DTC arch/arm/boot/dts/am3517-craneboard.dtb
arch/arm/boot/dts/omap3.dtsi:160.39-184.5: ERROR (phandle_references):
/ocp@68000000/target-module@480a6000:
Reference to non-existent node or label "aes1_ick"

Quoted 8 lines
Quoted 6 lines
Quoted 1 line

Is this patch maybe missing a change for am3717 for the aes1_ick?

I am guessing it's the same issue that plagues the am3517 with a note in the hwmods that stated noone seems to know which am3517's support it and which don't. The RNG was disabled on the 3517, so I am guessing I'll do the same for AES.

OK, I have no idea what modules might be there on am3517.

I'm going to repost a V2 with the node removed on am3517.

Quoted 4 lines
Quoted 4 lines

I should have posted it as an RFC, because I don't have the proper IRQ setup for the newly supported AES engine. The interrupts that are used for the original AES are listed as 'Reserved' in the AM3517 TRM.

Through trial and error, I think I have the right IRQ for OMAP3630 for the 2nd instance.

Quoted 5 lines
Quoted 2 lines

I assume the second engine uses different interrupts. I don't suppose anyone know what it should be?

Sorry no idea, usually the secure accelerator documentation is just left out it seems. My guess the values are the same as on omap3.

Tony - Could you review the hwmod transition I did for the first engine to make sure I did it right?

If you think I did it right, I'll post my V2.

adam

Quoted 4 lines

Regards,

Tony

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

maintainer
#5 lore raw
Quoted 2 lines · Adam Ford

Through trial and error, I think I have the right IRQ for OMAP3630 for the 2nd instance.

OK great.

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

I assume the second engine uses different interrupts. I don't suppose anyone know what it should be?

Sorry no idea, usually the secure accelerator documentation is just left out it seems. My guess the values are the same as on omap3.

Tony - Could you review the hwmod transition I did for the first engine to make sure I did it right?

Yeah that's about all there is to it :)

Quoted 1 line

If you think I did it right, I'll post my V2.

Yes please do.

Regards,

Tony