From: Thorsten Blum <thorsten.blum@linux.dev>
To: Lothar Rubusch <l.rubusch@gmail.com>
Cc: herbert@gondor.apana.org.au, davem@davemloft.net,
nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com,
claudiu.beznea@tuxon.dev, linux-crypto@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 00/12] crypto: atmel - refactor common i2c support and add SHA256 ahash support
Date: Thu, 14 May 2026 21:51:02 +0200 [thread overview]
Message-ID: <agYnpsiG8bNeVw57@linux.dev> (raw)
In-Reply-To: <20260512224349.64621-1-l.rubusch@gmail.com>
Hi Lothar,
On Tue, May 12, 2026 at 10:43:37PM +0000, Lothar Rubusch wrote:
> This series restructures the Atmel secure element drivers around a
> shared atmel-i2c core and adds SHA256 ahash support for ATSHA204A and
> ECC based devices.
>
> The existing drivers duplicated substantial parts of the transport,
> RNG, EEPROM and device management logic. This series consolidates the
> common functionality into the shared i2c core and converts the client
> drivers to capability based allocation.
>
> The series also introduces per-device timing configuration through
> match data, moves sanity checks and RNG handling into the core driver,
> updates workqueue handling and cleans up internal constants and helper
> definitions.
>
> The final patch adds SHA256 ahash support using the hardware SHA engine
> provided by the devices.
>
> ATSHA204A devices require software-side SHA256 padding according to
> FIPS 180-4, while newer ECC devices provide a dedicated SHA final
> command and perform padding internally in hardware.
>
> Supporting the SHA engine also requires changes to the command
> transport path. SHA operations must execute as a strict uninterrupted
> sequence consisting of SHA INIT, one or more SHA COMPUTE commands and,
> for ECC devices, a terminating SHA FINAL command. The device loses its
> internal SHA state if it enters sleep mode or if unrelated commands
> are interleaved during the transaction.
>
> To satisfy these hardware requirements, the send/receive path is split
> into a low-level transfer helper and a higher-level wrapper managing
> wakeup, sleep and locking. SHA operations keep the device awake and
> hold the i2c lock for the full duration of the hashing transaction.
>
> The series has been tested on ATSHA204A and ATECC508A devices.
> Tests are ongoing/pending on ATECC608A and ATECC608B.
> ---
> Lothar Rubusch (12):
> crypto: atmel - introduce shared I2C client management
> crypto: atmel - move capability-based client allocation into i2c core
> crypto: atmel - remove obsolete CONFIG_OF guard
> crypto: atmel - add per-device timing and match-data driven
> configuration
> crypto: atmel - move RNG support into common i2c core
> crypto: atmel - move EEPROM access support into common i2c core
> crypto: atmel - expose CONFIG zone through sysfs
> crypto: atmel - move device sanity check to core driver
> crypto: atmel - check client data in remove callbacks
> crypto: atmel - update workqueue flags and add flush on exit
> crypto: atmel - refactor and localize driver constants
> crypto: atmel - add SHA256 ahash support
>
> drivers/crypto/atmel-ecc.c | 252 +++++++-----
> drivers/crypto/atmel-i2c.c | 679 +++++++++++++++++++++++++++++----
> drivers/crypto/atmel-i2c.h | 180 +++++----
> drivers/crypto/atmel-sha204a.c | 284 +++++++-------
> 4 files changed, 1010 insertions(+), 385 deletions(-)
>
> Signed-off-by: Lothar Rubusch <l.rubusch@gmail.com>
Thanks, but I'm not sure reviewing such a large series is sustainable.
I've only skimmed it, but it also mixes several different things that
should probably be submitted separately (e.g., refactorings and new
features).
Sashiko [1] also reviewed the series and found potential regressions
that might be helpful to consider.
Thanks,
Thorsten
[1] https://sashiko.dev/#/patchset/20260512224349.64621-1-l.rubusch%40gmail.com
prev parent reply other threads:[~2026-05-14 19:51 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-12 22:43 [PATCH 00/12] crypto: atmel - refactor common i2c support and add SHA256 ahash support Lothar Rubusch
2026-05-12 22:43 ` [PATCH 01/12] crypto: atmel - introduce shared I2C client management Lothar Rubusch
2026-05-12 22:43 ` [PATCH 02/12] crypto: atmel - move capability-based client allocation into i2c core Lothar Rubusch
2026-05-12 22:43 ` [PATCH 03/12] crypto: atmel - remove obsolete CONFIG_OF guard Lothar Rubusch
2026-05-12 22:43 ` [PATCH 04/12] crypto: atmel - add per-device timing and match-data driven configuration Lothar Rubusch
2026-05-12 22:43 ` [PATCH 05/12] crypto: atmel - move RNG support into common i2c core Lothar Rubusch
2026-05-12 22:43 ` [PATCH 06/12] crypto: atmel - move EEPROM access " Lothar Rubusch
2026-05-12 22:43 ` [PATCH 07/12] crypto: atmel - expose CONFIG zone through sysfs Lothar Rubusch
2026-05-12 22:43 ` [PATCH 08/12] crypto: atmel - move device sanity check to core driver Lothar Rubusch
2026-05-12 22:43 ` [PATCH 09/12] crypto: atmel - check client data in remove callbacks Lothar Rubusch
2026-05-12 22:43 ` [PATCH 10/12] crypto: atmel - update workqueue flags and add flush on exit Lothar Rubusch
2026-05-12 22:43 ` [PATCH 11/12] crypto: atmel - refactor and localize driver constants Lothar Rubusch
2026-05-12 22:43 ` [PATCH 12/12] crypto: atmel - add SHA256 ahash support Lothar Rubusch
2026-05-14 19:51 ` Thorsten Blum [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=agYnpsiG8bNeVw57@linux.dev \
--to=thorsten.blum@linux.dev \
--cc=alexandre.belloni@bootlin.com \
--cc=claudiu.beznea@tuxon.dev \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=l.rubusch@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nicolas.ferre@microchip.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox