<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Doing AES/ECB encryption in nRF54L15 board</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/119204/doing-aes-ecb-encryption-in-nrf54l15-board</link><description>Hello, I am using the nRF Connect SDK v2.9.0. While working on the nRF52840 board, I used the library zephyr/crypto/crypto.h to perform AES/ECB encryption. 
 Part of the code I wrote is 
 
 #define CRYPTO_DEV_COMPAT nordic_nrf_ecb 
 
 
 static const struct</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 08 Sep 2025 13:34:25 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/119204/doing-aes-ecb-encryption-in-nrf54l15-board" /><item><title>RE: Doing AES/ECB encryption in nRF54L15 board</title><link>https://devzone.nordicsemi.com/thread/548073?ContentTypeID=1</link><pubDate>Mon, 08 Sep 2025 13:34:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c9497b5a-e287-49df-9e97-8585242a2b4b</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Try&amp;nbsp;&lt;span&gt;this unofficial example:&lt;/span&gt;&amp;nbsp;&lt;a href="https://github.com/pirun/sdk-zephyr/commit/c660020ada7ab2feca941337105bc8ca168afdf3"&gt;https://github.com/pirun/sdk-zephyr/commit/c660020ada7ab2feca941337105bc8ca168afdf3&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Doing AES/ECB encryption in nRF54L15 board</title><link>https://devzone.nordicsemi.com/thread/547907?ContentTypeID=1</link><pubDate>Fri, 05 Sep 2025 12:22:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:359afbee-4b3a-4d0f-b039-f77e4ba4ad8b</guid><dc:creator>reichel</dc:creator><description>&lt;p&gt;This patch should be still applied in NCS 3.1 ? Try to use ECB (tiny crypt is deprecated) so try this solution but get error on overly (zero or error)&lt;/p&gt;
&lt;div style="background-color:#1f1f1f;color:#cccccc;font-family:Consolas, &amp;#39;Courier New&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="color:#dcdcaa;"&gt;DEVICE_DT_GET_ONE&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Doing AES/ECB encryption in nRF54L15 board</title><link>https://devzone.nordicsemi.com/thread/525390?ContentTypeID=1</link><pubDate>Sun, 02 Mar 2025 09:12:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:41cd24b6-62d7-4cce-b3e5-9c5dc927ebb6</guid><dc:creator>Nedaa_H_Ahmed</dc:creator><description>&lt;p&gt;It is worked. Thank you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Doing AES/ECB encryption in nRF54L15 board</title><link>https://devzone.nordicsemi.com/thread/525108?ContentTypeID=1</link><pubDate>Thu, 27 Feb 2025 14:55:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ee71bc61-476d-4aaf-9f42-e60831ad280f</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;It&amp;#39;s rename to &lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/v3.7.99-ncs2/dts/common/nordic/nrf54l_05_10_15.dtsi#L697"&gt;nrf54l_05_10_15.dtsi&lt;/a&gt; in NCS v2.9.0.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Doing AES/ECB encryption in nRF54L15 board</title><link>https://devzone.nordicsemi.com/thread/525092?ContentTypeID=1</link><pubDate>Thu, 27 Feb 2025 14:22:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:96e2cd26-880e-4f02-b434-397e39825fc2</guid><dc:creator>Nedaa_H_Ahmed</dc:creator><description>&lt;p&gt;The&amp;nbsp;nrf54l15.dtsi that I have seems different from the&amp;nbsp;nrf54l15.dtsi you have.&lt;/p&gt;
&lt;p&gt;I didn`t find&amp;nbsp;&lt;span&gt; regulator-initial-mode = &amp;lt;NRF5X_REG_MODE_LDO&amp;gt;; in it&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Here is the file that I have&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/nrf54l15.dtsi"&gt;devzone.nordicsemi.com/.../nrf54l15.dtsi&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Doing AES/ECB encryption in nRF54L15 board</title><link>https://devzone.nordicsemi.com/thread/524704?ContentTypeID=1</link><pubDate>Tue, 25 Feb 2025 22:59:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:51a1a764-1bcd-43ad-989e-ecd7d2f98978</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;You can refer to the patch and modify it manually.&amp;nbsp;&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;---
 drivers/crypto/Kconfig.nrf_ecb  | 11 ++++++-
 drivers/crypto/crypto_nrf_ecb.c | 56 ++++++++++++++++++++++++++++++++-
 dts/common/nordic/nrf54l15.dtsi |  7 +++++
 3 files changed, 72 insertions(+), 2 deletions(-)

diff --git a/drivers/crypto/Kconfig.nrf_ecb b/drivers/crypto/Kconfig.nrf_ecb
index 624baedab09..9945ed62de6 100644
--- a/drivers/crypto/Kconfig.nrf_ecb
+++ b/drivers/crypto/Kconfig.nrf_ecb
@@ -10,6 +10,15 @@ config CRYPTO_NRF_ECB
 	# Bluetooth controller uses the ECB peripheral directly
 	# (see subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/ecb.c),
 	# hence this driver cannot be enabled together with it.
-	depends on !BT_CTLR
+	# Temperary remove dependcy for Gazell and BLE coexistence demo
 	help
 	  Enable nRF HAL-based AES ECB encryption driver
+
+config CRYPTO_NRF_ECB_MULTIUSER
+	bool
+	depends on CRYPTO_NRF_ECB
+	default y if BT_CTLR
+	help
+	  Reassign ECB pointers right before encryption to ensure proper values.
+	  This must be done if the ECB peripheral may be used bypassing this
+	  driver&amp;#39;s API (e.g. Bluetooth Controller bypasses the Zephyr driver).
diff --git a/drivers/crypto/crypto_nrf_ecb.c b/drivers/crypto/crypto_nrf_ecb.c
index 9fa354738ae..d7331e2f42f 100644
--- a/drivers/crypto/crypto_nrf_ecb.c
+++ b/drivers/crypto/crypto_nrf_ecb.c
@@ -8,6 +8,7 @@
 #include &amp;lt;zephyr/crypto/crypto.h&amp;gt;
 #include &amp;lt;zephyr/logging/log.h&amp;gt;
 #include &amp;lt;hal/nrf_ecb.h&amp;gt;
+#include &amp;lt;zephyr/sys/byteorder.h&amp;gt;
 
 #define DT_DRV_COMPAT nordic_nrf_ecb
 
@@ -17,6 +18,10 @@
 LOG_MODULE_REGISTER(crypto_nrf_ecb, CONFIG_CRYPTO_LOG_LEVEL);
 
 struct ecb_data {
+#if defined(CONFIG_SOC_SERIES_NRF54LX)
+	nrf_vdma_job_t in_job;
+	nrf_vdma_job_t out_job;
+#endif /* CONFIG_SOC_SERIES_NRF54LX */
 	uint8_t key[ECB_AES_KEY_SIZE];
 	uint8_t cleartext[ECB_AES_BLOCK_SIZE];
 	uint8_t ciphertext[ECB_AES_BLOCK_SIZE];
@@ -46,6 +51,39 @@ static int do_ecb_encrypt(struct cipher_ctx *ctx, struct cipher_pkt *pkt)
 		memcpy(drv_state.data.cleartext, pkt-&amp;gt;in_buf,
 		       ECB_AES_BLOCK_SIZE);
 	}
+#if defined(CONFIG_SOC_SERIES_NRF54LX)
+	uint32_t *key_reverse = (uint32_t *)drv_state.data.key;
+
+	/* AES key order should be reversed on nRF54L */
+	nrf_ecb_key_set(NRF_ECB00, (uint32_t[]){
+		__builtin_bswap32(key_reverse[3]),
+		__builtin_bswap32(key_reverse[2]),
+		__builtin_bswap32(key_reverse[1]),
+		__builtin_bswap32(key_reverse[0]),
+	});
+
+	if (IS_ENABLED(CONFIG_CRYPTO_NRF_ECB_MULTIUSER)) {
+		nrf_ecb_in_ptr_set(NRF_ECB00, &amp;amp;drv_state.data.in_job);
+		nrf_ecb_out_ptr_set(NRF_ECB00, &amp;amp;drv_state.data.out_job);
+	}
+
+	drv_state.data.in_job.size = pkt-&amp;gt;in_len;
+	drv_state.data.out_job.size = pkt-&amp;gt;in_len;
+	nrf_ecb_event_clear(NRF_ECB00, NRF_ECB_EVENT_END);
+	nrf_ecb_event_clear(NRF_ECB00, NRF_ECB_EVENT_ERROR);
+	nrf_ecb_task_trigger(NRF_ECB00, NRF_ECB_TASK_START);
+	while (!(nrf_ecb_event_check(NRF_ECB00, NRF_ECB_EVENT_END) ||
+		 nrf_ecb_event_check(NRF_ECB00, NRF_ECB_EVENT_ERROR))) {
+	}
+	if (nrf_ecb_event_check(NRF_ECB00, NRF_ECB_EVENT_ERROR)) {
+		LOG_ERR(&amp;quot;ECB operation error&amp;quot;);
+		return -EIO;
+	}
+
+#else
+	if (IS_ENABLED(CONFIG_CRYPTO_NRF_ECB_MULTIUSER)) {
+		nrf_ecb_data_pointer_set(NRF_ECB, &amp;amp;drv_state.data);
+	}
 
 	nrf_ecb_event_clear(NRF_ECB, NRF_ECB_EVENT_ENDECB);
 	nrf_ecb_event_clear(NRF_ECB, NRF_ECB_EVENT_ERRORECB);
@@ -57,19 +95,35 @@ static int do_ecb_encrypt(struct cipher_ctx *ctx, struct cipher_pkt *pkt)
 		LOG_ERR(&amp;quot;ECB operation error&amp;quot;);
 		return -EIO;
 	}
+#endif /* CONFIG_SOC_SERIES_NRF54LX */
 	if (pkt-&amp;gt;out_buf != drv_state.data.ciphertext) {
 		memcpy(pkt-&amp;gt;out_buf, drv_state.data.ciphertext,
 		       ECB_AES_BLOCK_SIZE);
 	}
+
 	pkt-&amp;gt;out_len = pkt-&amp;gt;in_len;
+
 	return 0;
 }
 
 static int nrf_ecb_driver_init(const struct device *dev)
 {
 	ARG_UNUSED(dev);
-
+#if defined(CONFIG_SOC_SERIES_NRF54LX)
+	/* Magic number in nRF54L15 OPS v0.5b page 251 8.7.2 EasyDMA */
+	#define NRF_VDMA_ATTRIBUTE_ECB 11
+
+	drv_state.data.in_job.p_buffer = (uint8_t *)&amp;amp;drv_state.data.cleartext;
+	drv_state.data.in_job.size = 0;
+	drv_state.data.in_job.attributes = NRF_VDMA_ATTRIBUTE_ECB;
+	drv_state.data.out_job.p_buffer = (uint8_t *)&amp;amp;drv_state.data.ciphertext;
+	drv_state.data.out_job.size = 0;
+	drv_state.data.out_job.attributes = NRF_VDMA_ATTRIBUTE_ECB;
+	nrf_ecb_in_ptr_set(NRF_ECB00, &amp;amp;drv_state.data.in_job);
+	nrf_ecb_out_ptr_set(NRF_ECB00, &amp;amp;drv_state.data.out_job);
+#else
 	nrf_ecb_data_pointer_set(NRF_ECB, &amp;amp;drv_state.data);
+#endif /* CONFIG_SOC_SERIES_NRF54LX */
 	drv_state.in_use = false;
 	return 0;
 }
diff --git a/dts/common/nordic/nrf54l15.dtsi b/dts/common/nordic/nrf54l15.dtsi
index d3c0c551823..6a0e2a11fad 100644
--- a/dts/common/nordic/nrf54l15.dtsi
+++ b/dts/common/nordic/nrf54l15.dtsi
@@ -658,6 +658,13 @@
 					regulator-initial-mode = &amp;lt;NRF5X_REG_MODE_LDO&amp;gt;;
 				};
 			};
+
+			ecb00: ecb@47000 {
+					compatible = &amp;quot;nordic,nrf-ecb&amp;quot;;
+					reg = &amp;lt;0x47000 0x1000&amp;gt;;
+					interrupts = &amp;lt;0x47 0x1&amp;gt;;
+					status = &amp;quot;okay&amp;quot;;
+			};
 		};
 
 		rram_controller: rram-controller@5004b000 {
-- 
2.37.3.windows.1&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Doing AES/ECB encryption in nRF54L15 board</title><link>https://devzone.nordicsemi.com/thread/524693?ContentTypeID=1</link><pubDate>Tue, 25 Feb 2025 19:35:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b1295625-710f-46dc-8e7a-61966f09c9fd</guid><dc:creator>Nedaa_H_Ahmed</dc:creator><description>&lt;p&gt;When I applied this patch file, I got these errors&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1740512119790v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Doing AES/ECB encryption in nRF54L15 board</title><link>https://devzone.nordicsemi.com/thread/524644?ContentTypeID=1</link><pubDate>Tue, 25 Feb 2025 14:39:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f3cf832c-5a4d-482c-a674-87dfa26db54c</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you try this unofficial patch&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/0001_2D00_drivers_2D00_add_2D00_support_2D00_for_2D00_nRF54L_2D00_ECB.patch"&gt;devzone.nordicsemi.com/.../0001_2D00_drivers_2D00_add_2D00_support_2D00_for_2D00_nRF54L_2D00_ECB.patch&lt;/a&gt;? My colleague makes some&amp;nbsp;&lt;span&gt;changes to support ECB on nRF54L.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Doing AES/ECB encryption in nRF54L15 board</title><link>https://devzone.nordicsemi.com/thread/524418?ContentTypeID=1</link><pubDate>Mon, 24 Feb 2025 17:10:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f31d2457-963b-48a3-ac59-a1998695276f</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I am working on your case and will update it when I collect enough information.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>