Re: [PATCH] crypto: atmel-i2c - find the bus speed behind an I2C mux
From: Josef Schlehofer
Date: Mon Nov 02 2026 - 16:03:45 EST
Hi Marek,
thanks for the ack and the warning.
The hwrng core starts a fill thread for the current RNG, whatever its
quality. It reads 32 bytes every 60 seconds, even when idle.
atmel_i2c_send_receive() puts the ATSHA204A to sleep after each
command. That means about 1440 seed updates per day, and 100k cycles
in about 70 days.
The ATSHA204A becomes the current RNG when the MCU firmware has no
TRNG. It also stays current when it registers first, because both RNGs
have quality 1024. Today the probe fails on the Omnia, so it is safe.
This patch could wear out its EEPROM within months. It is also marked
for stable.
The patch also lets the ATSHA204 on the Turris 1.x probe, as its I2C
controller has no clock-frequency either. There the talitos hwrng wins,
because the ATSHA204 has quality 1. Without talitos, the ATSHA204 would
wear out the same way.
Should we fix the wear before this patch goes in? Does "proper power
management" mean the idle command instead of sleep? I can look into
it.
Josef