summaryrefslogtreecommitdiff
path: root/drivers/rng/rockchip_rng.c
AgeCommit message (Collapse)Author
2025-04-23rng: rockchip: Add support for rkrng variantLin Jinhan
Add support for rkrng variant, used by e.g. RK3528 and RK3576. Imported from vendor U-Boot linux-6.1-stan-rkr5 tag with minor adjustments for mainline. Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com> Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-04-23rng: rockchip_rng: Update compatible for RK3588Jonas Karlman
Linux commit 6ee0b9ad3995 ("arm64: dts: rockchip: Add rng node to RK3588") merged for v6.15-rc1 add a proper rng node to the device tree. The compatible used differs compared to what U-Boot is currently using. Replace the old trngv1 compatible with the dts/upstream compatible in the rng driver and remove the old rng node compatible override from SoC u-boot.dtsi to keep rng working after the driver change. Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-04-23rng: rockchip_rng: Add compatible for RK3568Jonas Karlman
Linux commit afeccc408496 ("arm64: dts: rockchip: add DT entry for RNG to RK356x") merged for v6.12-rc1 add a proper rng node to the SoC DT. The compatible used differs compared to what U-Boot is currently using. Add support for the rk3568-rng used in upstream Linux. Support for the cryptov2-rng compatible is still kept because PX30/RK3326 and RK3308 are still using it. Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2024-03-14rng: rockchip: Use same compatible as linuxJonas Karlman
Replace the rockchip,cryptov1-rng compatible with compatibles used in the linux device tree for RK3288, RK3328 and RK3399 to ease sync of SoC device tree from linux. Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2024-03-13rockchip: include asm/io.h directly in asm/arch-rockchip/hardware.hQuentin Schulz
The different macros use writel which is defined in asm/io.h, so let's include the header so users of hardware.h do not need to include asm/io.h as well. While at it, remove asm/io.h includes wherever asm/arch-rockchip/hardware.h is included already. Cc: Quentin Schulz <foss+uboot@0leil.net> Reviewed-by: Kever Yang <kever.yang@rock-chips.com> Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
2024-03-02rng: eliminate common.h include from RNG driversHeinrich Schuchardt
Usage of common.h is deprecated. * Remove common.h from RNG drivers. * Sort includes. * Add time.h to sandbox driver. * Add linux/types.h to rng.h to provide size_t. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-04-21rockchip: rng: add trngv1 for rk3588Chris Morgan
This adds support for the TRNG found in the RK3588 SoC to the rockchip_rng driver so that it can be used for things such as seeding randomness to Linux. Changes in V3: - Moved notes from commit to cover letter. - Added Reviewed-By tag. Changes in V2: - Modified Kconfig to note that the Rockchip RNG driver supports all versions of the hardware (v1, v2, and the trng in the rk3588). Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com> Signed-off-by: Chris Morgan <macromorgan@hotmail.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2020-12-13dm: treewide: Rename ..._platdata variables to just ..._platSimon Glass
Try to maintain some consistency between these variables by using _plat as a suffix for them. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-12-13dm: treewide: Rename ofdata_to_platdata() to of_to_plat()Simon Glass
This name is far too long. Rename it to remove the 'data' bits. This makes it consistent with the platdata->plat rename. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-12-13dm: treewide: Rename auto_alloc_size members to be shorterSimon Glass
This construct is quite long-winded. In earlier days it made some sense since auto-allocation was a strange concept. But with driver model now used pretty universally, we can shorten this to 'auto'. This reduces verbosity and makes it easier to read. Coincidentally it also ensures that every declaration is on one line, thus making dtoc's job easier. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-18common: Drop linux/bitops.h from common headerSimon Glass
Move this uncommon header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-04-29rockchip: rng: Add a driver for random number generator(rng) deviceLin Jinhan
Add a driver for the rng device found on rockchip platforms. Support rng module of crypto v1 and crypto v2. Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com> Tested-by: Peter Robinson <pbrobinson@gmail.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>