summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2024-02-17 13:29:26 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2024-02-17 13:29:26 +0000
commit35838fd128886df232819c74d8fe602c6e84baff (patch)
tree4415925411a251d4755ef6c050c87877c6fad8b5
parentf41de4f69d68ad3073662da2245fcb9f32e65d4c (diff)
Bindings for the rk3288/rk3328/rk3399 have landed in Linux and are being
adopted by U-Boot. So check for the new compatible strings. Leave the old ones in place until we have U-Boot packages with update device trees. ok phessler@, patrick@
-rw-r--r--sys/dev/fdt/rkrng.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/dev/fdt/rkrng.c b/sys/dev/fdt/rkrng.c
index 61d6fb1835d..75b8ad0b901 100644
--- a/sys/dev/fdt/rkrng.c
+++ b/sys/dev/fdt/rkrng.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rkrng.c,v 1.5 2023/04/14 01:11:32 dlg Exp $ */
+/* $OpenBSD: rkrng.c,v 1.6 2024/02/17 13:29:25 kettenis Exp $ */
/*
* Copyright (c) 2020 Mark Kettenis <kettenis@openbsd.org>
*
@@ -124,6 +124,9 @@ rkrng_match(struct device *parent, void *match, void *aux)
struct fdt_attach_args *faa = aux;
return OF_is_compatible(faa->fa_node, "rockchip,cryptov1-rng") ||
+ OF_is_compatible(faa->fa_node, "rockchip,rk3288-crypto") ||
+ OF_is_compatible(faa->fa_node, "rockchip,rk3328-crypto") ||
+ OF_is_compatible(faa->fa_node, "rockchip,rk3399-crypto") ||
OF_is_compatible(faa->fa_node, "rockchip,cryptov2-rng");
}
@@ -133,7 +136,10 @@ rkrng_attach(struct device *parent, struct device *self, void *aux)
struct rkrng_softc *sc = (struct rkrng_softc *)self;
struct fdt_attach_args *faa = aux;
- if (OF_is_compatible(faa->fa_node, "rockchip,cryptov1-rng"))
+ if (OF_is_compatible(faa->fa_node, "rockchip,cryptov1-rng") ||
+ OF_is_compatible(faa->fa_node, "rockchip,rk3288-crypto") ||
+ OF_is_compatible(faa->fa_node, "rockchip,rk3328-crypto") ||
+ OF_is_compatible(faa->fa_node, "rockchip,rk3399-crypto"))
sc->sc_v = &rkrnv_v1;
else if (OF_is_compatible(faa->fa_node, "rockchip,cryptov2-rng"))
sc->sc_v = &rkrnv_v2;