Skip to content

Commit b4111c0

Browse files
committed
boards: enbables 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 c697df8 commit b4111c0

File tree

11 files changed

+58
-0
lines changed

11 files changed

+58
-0
lines changed

boards/nxp/s32z2xxdc2/doc/index.rst

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

183+
CRYPTO
184+
======
185+
186+
The Hardware Security Engine (HSE) supports cryptographic operations, including hashing and
187+
symmetric ciphers, with capabilities for ECB, CBC, and CTR modes using RAM-based key catalogs
188+
with 128-bit or 256-bit key lengths.
189+
190+
.. note::
191+
The driver assumes that the HSE Firmware has been installed and configured (i.e the key catalogs
192+
has been formatted, used MU instances has been activated, etc). HSE Firmware installation and
193+
configuration phase documented in HSE Firmware User Manual. Please contact NXP sales person or
194+
NXP distributor in order to have access to that document.
195+
183196
Programming and Debugging
184197
*************************
185198

boards/nxp/s32z2xxdc2/s32z2xxdc2_s32z270_rtu0.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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 2024 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 2024 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: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ LOG_MODULE_REGISTER(main);
2727
#define CRYPTO_DEV_COMPAT st_stm32_aes
2828
#elif DT_HAS_COMPAT_STATUS_OKAY(nxp_mcux_dcp)
2929
#define CRYPTO_DEV_COMPAT nxp_mcux_dcp
30+
#elif DT_HAS_COMPAT_STATUS_OKAY(nxp_s32_crypto_hse_mu)
31+
#define CRYPTO_DEV_COMPAT nxp_s32_crypto_hse_mu
3032
#elif CONFIG_CRYPTO_NRF_ECB
3133
#define CRYPTO_DEV_COMPAT nordic_nrf_ecb
3234
#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 2024 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 2024 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: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/*
22
* Copyright (c) 2022 Intel Corporation
3+
* Copyright 2024 NXP
34
*
45
* SPDX-License-Identifier: Apache-2.0
56
*/
@@ -13,6 +14,8 @@
1314
#define CRYPTO_DRV_NAME CONFIG_CRYPTO_MBEDTLS_SHIM_DRV_NAME
1415
#elif DT_HAS_COMPAT_STATUS_OKAY(renesas_smartbond_crypto)
1516
#define CRYPTO_DEV_COMPAT renesas_smartbond_crypto
17+
#elif DT_HAS_COMPAT_STATUS_OKAY(nxp_s32_crypto_hse_mu)
18+
#define CRYPTO_DEV_COMPAT nxp_s32_crypto_hse_mu
1619
#else
1720
#error "You need to enable one crypto device"
1821
#endif

0 commit comments

Comments
 (0)