Skip to content

Commit 1f24a4b

Browse files
committed
boards: enables support for s32z270 hse crypto
Enable test for s32z270 hash crypto. Enable samples for cipher cryptoEndable samples for EBC, CBC, CTR mode of cipher crypto. Signed-off-by: Ha Duong Quang <[email protected]>
1 parent 88f2cc9 commit 1f24a4b

File tree

11 files changed

+62
-4
lines changed

11 files changed

+62
-4
lines changed

boards/nxp/s32z2xxdc2/doc/index.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,19 @@ External Flash
136136
The on-board S26HS512T 512M-bit HyperFlash memory is connected to the QSPI controller
137137
port A1. This board configuration selects it as the default flash controller.
138138

139+
CRYPTO
140+
======
141+
142+
The Hardware Security Engine (HSE) supports cryptographic operations, including hashing and
143+
symmetric ciphers, with capabilities for ECB, CBC, and CTR modes using RAM-based key catalogs
144+
with 128-bit or 256-bit key lengths.
145+
146+
.. note::
147+
The driver assumes that the HSE Firmware has been installed and configured (i.e the key catalogs
148+
has been formatted, used MU instances has been activated, etc). HSE Firmware installation and
149+
configuration phase documented in HSE Firmware User Manual. Please contact NXP sales person or
150+
NXP distributor in order to have access to that document.
151+
139152
Programming and Debugging
140153
*************************
141154

boards/nxp/s32z2xxdc2/s32z2xxdc2_s32z270_rtu0.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2022-2024 NXP
1+
# Copyright 2022-2025 NXP
22
# SPDX-License-Identifier: Apache-2.0
33

44
identifier: s32z2xxdc2/s32z270/rtu0
@@ -20,4 +20,5 @@ supported:
2020
- i2c
2121
- dma
2222
- pwm
23+
- crypto
2324
vendor: nxp

boards/nxp/s32z2xxdc2/s32z2xxdc2_s32z270_rtu0_D.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2023-2024 NXP
1+
# Copyright 2023-2025 NXP
22
# SPDX-License-Identifier: Apache-2.0
33

44
identifier: s32z2xxdc2@D/s32z270/rtu0
@@ -20,4 +20,5 @@ supported:
2020
- i2c
2121
- dma
2222
- pwm
23+
- crypto
2324
vendor: nxp

boards/nxp/s32z2xxdc2/s32z2xxdc2_s32z270_rtu1.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2022-2024 NXP
1+
# Copyright 2022-2025 NXP
22
# SPDX-License-Identifier: Apache-2.0
33

44
identifier: s32z2xxdc2/s32z270/rtu1
@@ -20,4 +20,5 @@ supported:
2020
- i2c
2121
- dma
2222
- pwm
23+
- crypto
2324
vendor: nxp

boards/nxp/s32z2xxdc2/s32z2xxdc2_s32z270_rtu1_D.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2022-2024 NXP
1+
# Copyright 2022-2025 NXP
22
# SPDX-License-Identifier: Apache-2.0
33

44
identifier: s32z2xxdc2@D/s32z270/rtu1
@@ -20,4 +20,5 @@ supported:
2020
- i2c
2121
- dma
2222
- pwm
23+
- crypto
2324
vendor: nxp
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/*
2+
* Copyright 2025 NXP
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
&mub0 {
8+
status = "okay";
9+
};
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/*
2+
* Copyright 2025 NXP
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
&mub2 {
8+
status = "okay";
9+
};

samples/drivers/crypto/src/main.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/*
22
* Copyright (c) 2016 Intel Corporation.
3+
* Copyright 2025 NXP
34
*
45
* SPDX-License-Identifier: Apache-2.0
56
*/
@@ -27,6 +28,8 @@ LOG_MODULE_REGISTER(main);
2728
#define CRYPTO_DEV_COMPAT st_stm32_aes
2829
#elif DT_HAS_COMPAT_STATUS_OKAY(nxp_mcux_dcp)
2930
#define CRYPTO_DEV_COMPAT nxp_mcux_dcp
31+
#elif DT_HAS_COMPAT_STATUS_OKAY(nxp_s32_crypto_hse_mu)
32+
#define CRYPTO_DEV_COMPAT nxp_s32_crypto_hse_mu
3033
#elif CONFIG_CRYPTO_NRF_ECB
3134
#define CRYPTO_DEV_COMPAT nordic_nrf_ecb
3235
#elif DT_HAS_COMPAT_STATUS_OKAY(renesas_smartbond_crypto)
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/*
2+
* Copyright 2025 NXP
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
&mub0 {
8+
status = "okay";
9+
};
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/*
2+
* Copyright 2025 NXP
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
&mub2 {
8+
status = "okay";
9+
};

tests/crypto/crypto_hash/src/main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
#define CRYPTO_DRV_NAME CONFIG_CRYPTO_MBEDTLS_SHIM_DRV_NAME
1414
#elif DT_HAS_COMPAT_STATUS_OKAY(renesas_smartbond_crypto)
1515
#define CRYPTO_DEV_COMPAT renesas_smartbond_crypto
16+
#elif DT_HAS_COMPAT_STATUS_OKAY(nxp_s32_crypto_hse_mu)
17+
#define CRYPTO_DEV_COMPAT nxp_s32_crypto_hse_mu
1618
#else
1719
#error "You need to enable one crypto device"
1820
#endif

0 commit comments

Comments
 (0)