mediatek: add driver for HW-RNG v2
authorDaniel Golle <[email protected]>
Thu, 11 Sep 2025 00:43:24 +0000 (01:43 +0100)
committerDaniel Golle <[email protected]>
Sat, 13 Sep 2025 11:54:03 +0000 (12:54 +0100)
commit9cfbd691e911a40357ab848f8e902551de32738e
treefefa206bf2f67424f8f7262df482bd56017bbe68
parent8cbbcda1d9d7f4ae614a5181c7e16cd2205e6ca4
mediatek: add driver for HW-RNG v2

Add driver for hardware random number generator found in MT7981, MT7988
and MT7987. This gives us a fast source of high-quality random numbers
on those platforms.

root@OpenWrt:~# cat /dev/hwrng | rngtest -c 10000
rngtest 6.17
Copyright (c) 2004 by Henrique de Moraes Holschuh
This is free software; see the source for copying conditions.  There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

rngtest: starting FIPS tests...
rngtest: bits received from input: 200000032
rngtest: FIPS 140-2 successes: 9988
rngtest: FIPS 140-2 failures: 12
rngtest: FIPS 140-2(2001-10-10) Monobit: 2
rngtest: FIPS 140-2(2001-10-10) Poker: 0
rngtest: FIPS 140-2(2001-10-10) Runs: 4
rngtest: FIPS 140-2(2001-10-10) Long run: 6
rngtest: FIPS 140-2(2001-10-10) Continuous run: 0
rngtest: input channel speed: (min=616.108; avg=11979.007; max=19531250.000)Kibits/s
rngtest: FIPS tests speed: (min=1.859; avg=82.116; max=83.656)Mibits/s
rngtest: Program run time: 18629928 microseconds

Signed-off-by: Daniel Golle <[email protected]>
target/linux/mediatek/filogic/config-6.12
target/linux/mediatek/mt7622/config-6.12
target/linux/mediatek/mt7623/config-6.12
target/linux/mediatek/mt7629/config-6.12
target/linux/mediatek/patches-6.12/320-hwrng-add-driver-for-MediaTek-TRNG-SMC.patch [new file with mode: 0644]