crypto: stm32 - Add CRC32 support for STM32F4XX
Subsystems (3)
PATCH 1/1 crypto: stm32 - Add CRC32 support for STM32F4XX
This patch series add hardware CRC32 ("Ethernet") calculation support for STMicroelectronics STM32F4XX series devices.
As an hardware limitation polynomial and key setting are not supported as they are fixed as 0x4C11DB7 (poly) and 0xFFFFFFFF (key).
CRC32C Castagnoli algorithm is not supported also. Module is tested on STM32F429-disco board with crypto testmgr using cases within the key 0xFFFFFFFF.
--- .../devicetree/bindings/crypto/st,stm32-crc.txt | 4 +- arch/arm/boot/dts/stm32429i-eval.dts | 4 ++ arch/arm/boot/dts/stm32f429-disco.dts | 4 ++ arch/arm/boot/dts/stm32f429.dtsi | 7 +++ arch/arm/boot/dts/stm32f469-disco.dts | 4 ++ drivers/crypto/stm32/stm32_crc32.c | 68 ++++++++++++++++++---- 6 files changed, 79 insertions(+), 12 deletions(-)
Documentation/devicetree/bindings/crypto/st,stm32-crc.txt +2 -2
@@ -1,7 +1,7 @@ * STMicroelectronics STM32 CRC Required properties: -- compatible: Should be "st,stm32f7-crc". +- compatible: Can be either "st,stm32f7-crc" or "st,srm32f4-crc". - reg: The address and length of the peripheral registers space - clocks: The input clock of the CRC instance
@@ -10,7 +10,7 @@ Optional properties: none Example: crc: crc at 40023000 { - compatible = "st,stm32f7-crc"; + compatible = "st,stm32f7-crc", "st,stm32f4-crc"; reg = <0x40023000 0x400>; clocks = <&rcc 0 12>; };
arch/arm/boot/dts/stm32429i-eval.dts +4 -0
@@ -141,6 +141,10 @@ clock-frequency = <25000000>; }; +&crc { + status = "okay"; +}; + &i2c1 { pinctrl-0 = <&i2c1_pins>; pinctrl-names = "default";
arch/arm/boot/dts/stm32f429-disco.dts +4 -0
@@ -102,6 +102,10 @@ clock-frequency = <8000000>; }; +&crc { + status = "okay"; +}; + &rtc { assigned-clocks = <&rcc 1 CLK_RTC>; assigned-clock-parents = <&rcc 1 CLK_LSI>;
arch/arm/boot/dts/stm32f429.dtsi +7 -0
@@ -766,6 +766,13 @@ }; }; + crc: crc at 40023000 { + compatible = "st,stm32f4-crc"; + reg = <0x40023000 0x400>; + clocks = <&rcc 0 STM32F4_AHB1_CLOCK(CRC)>; + status = "disabled"; + }; + rcc: rcc at 40023810 { #reset-cells = <1>; #clock-cells = <2>;
arch/arm/boot/dts/stm32f469-disco.dts +4 -0
@@ -87,6 +87,10 @@ clock-frequency = <8000000>; }; +&crc { + status = "okay"; +}; + &rtc { status = "okay"; };
drivers/crypto/stm32/stm32_crc32.c +58 -10
125 lines not on this page · raw message
Signature · 1 line
2.7.4
Quoted 11 lines · Cosar Dindar
This patch series add hardware CRC32 ("Ethernet") calculation support for STMicroelectronics STM32F4XX series devices.
As an hardware limitation polynomial and key setting are not supported as they are fixed as
0x4C11DB7(poly) and0xFFFFFFFF(key).CRC32C Castagnoli algorithm is not supported also. Module is tested on STM32F429-disco board with crypto testmgr using cases within the key
0xFFFFFFFF.Signed-off-by Cosar Dindar <[email protected]>
Quoted 8 lines
--- .../devicetree/bindings/crypto/st,stm32-crc.txt | 4 +- arch/arm/boot/dts/stm32429i-eval.dts | 4 ++ arch/arm/boot/dts/stm32f429-disco.dts | 4 ++ arch/arm/boot/dts/stm32f429.dtsi | 7 +++ arch/arm/boot/dts/stm32f469-disco.dts | 4 ++ drivers/crypto/stm32/stm32_crc32.c | 68 ++++++++++++++++++---- 6 files changed, 79 insertions(+), 12 deletions(-)