Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STM32WB: add support for AES #63768

Merged
merged 3 commits into from
Oct 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions boards/arm/nucleo_wb55rg/nucleo_wb55rg.dts
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,10 @@ zephyr_udc0: &usb {
status = "okay";
};

&aes1 {
status = "okay";
};

&flash0 {
partitions {
compatible = "fixed-partitions";
Expand Down
5 changes: 5 additions & 0 deletions drivers/crypto/crypto_stm32.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,13 @@ LOG_MODULE_REGISTER(crypto_stm32);
#define STM32_RCC_CRYPTO_RELEASE_RESET __HAL_RCC_CRYP_RELEASE_RESET
#define STM32_CRYPTO_TYPEDEF CRYP_TypeDef
#elif DT_HAS_COMPAT_STATUS_OKAY(st_stm32_aes)
#if defined(CONFIG_SOC_SERIES_STM32WBX)
#define STM32_RCC_CRYPTO_FORCE_RESET __HAL_RCC_AES1_FORCE_RESET
#define STM32_RCC_CRYPTO_RELEASE_RESET __HAL_RCC_AES1_RELEASE_RESET
#else
#define STM32_RCC_CRYPTO_FORCE_RESET __HAL_RCC_AES_FORCE_RESET
#define STM32_RCC_CRYPTO_RELEASE_RESET __HAL_RCC_AES_RELEASE_RESET
#endif
#define STM32_CRYPTO_TYPEDEF AES_TypeDef
#endif

Expand Down
8 changes: 8 additions & 0 deletions dts/arm/st/wb/stm32wb.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,14 @@
clocks = <&rcc STM32_CLOCK_BUS_AHB3 0x00040000>;
status = "disabled";
};

aes1: aes@50060000 {
compatible = "st,stm32-aes";
reg = <0x50060000 0x400>;
clocks = <&rcc STM32_CLOCK_BUS_AHB2 0x00010000>;
interrupts = <51 0>;
status = "disabled";
};
};

die_temp: dietemp {
Expand Down
Loading